It is known that the sum of the times of the monomial - 3A ^ (M + 2) B ^ 5 and the monomial 2x ^ 7Y ^ (n + 1) is 18

It is known that the sum of the times of the monomial - 3A ^ (M + 2) B ^ 5 and the monomial 2x ^ 7Y ^ (n + 1) is 18


That is, M + 2 + 5 + 7 + N + 1 = 18
m+n=15
therefore
m=1,n=2
Or M = 2, n = 1