From modulo 8 we get n is odd and from mod 7
m = 3b.Rewriting it we get
$7^n$ = ( k - $5^b$).($k^2$ + k.$5^b$ + $5^{2b}$)
First look at the condition which both sides are power of 7.
k - $5^b$ = $7^c$ and
$k^2$ + k.$5^b$ + $5^{2b}$ = $7^d$
k = $5^b$ + $7^c$
rewriting k in right side we get
3.$5^{2b}$ = 0 (mod 7) contradiction.
So it must be k = $5^b$ + 1 and k = 1 (mod 5)
Hence we know that $7^n$ = 1 ( mod 5) but we show that n is odd, it gives a contradiction.
So there left one case. If n or m = 0 its clear that the only solution is (0,1,2)