Considering the equation mod 5 we get
3m≡−1(mod5),
so m=4k+2 for some positive integer k. Then, considering the equation mod 7 we get
−2n−92k+1≡5(mod7),
which means
2n+22k+1≡2(mod7).
Since 2s≡1,2,4(mod7) so the only possibility is 2n≡22k+1≡1(mod7) so 3∣n and 3∣2k+1. From the last one we get 3∣m so we can write n=3x and m=3y. Therefore, the given equation takes the form 53⋅23x−33y=271, or
(5⋅2x−3y)(25⋅22x+5⋅2x⋅3y+32y)=271.
It follows that 25⋅22x+5⋅2x⋅3y+32y≤271 and so x<2. We conclude x=1 and then y=2. So m=6 and n=3.
□