Your alternative formula didn't work because the letter pairings need to be in an array constant. For example:
=IF(OR(RIGHT(V2,1)="1",OR(RIGHT(V2,2)={"AP","SH","MG"})),1,2)
But as Narayank991 points out, it'd be much better to put these two letter combinations in...