For any natural number k, we have 52k=M8+1, 52k+1=M8+5, 72k=M8+1 and 72k+1=M8+7, therefore from 8∣7a−5b we deduce that a and b are even. Denote a=2m, b=2n, with m and n positive integers. Then 72m−52n=8p, i.e. (7m−5n)(7m+5n)=8p, with p a prime.
If p=2, then (7m−5n)(7m+5n)=16.
If p≥3, from 7m−5n<7m+5n, as 7m−5n and 7m+5n are even, we have the following situations:
(1∘){7m−5n=47m+5n=2p,(2∘){7m−5n=27m+5n=4p.
Case (1°): From 7m=M3+1 and 5n=M3±1, it follows that 7m−5n=M3 if n is even, and 7m−5n=M3+2 if n is odd. Since 4=M3+1, there are no solutions in this case.
Case (2°): By subtracting the equations, we find that 2p=7m−1. Since 3∣7m−1, it follows that 3∣2p, thus p=3. We deduce that m=n=1, p=3, therefore the solution is (a,b)=(2,2).