It should be explained that $\overline{nAm} = m + A\times10^{\mathrm{digit}(m)} + n\times 10^{\mathrm{digit}(m) + \mathrm{digit}(A+m)}$, where $\mathrm{digit}{(X)}$ is the number of digits of $X$.
My friends and I had been talking about a joke before we ran into a problem.
We know that $x^2=25$, so by deleting $2$ on both sides, we get $x = 5$, which is one of the solutions to the equation.
After that, we've been thinking about whether some other groups of solutions satisfy $m^n=\overline{nm}$ where $n,m\in\mathbf{N}_+$. We soon discovered that there are no solutions except $(m,n)=(5,2)$. We tried to make this question more interesting, so we decided to put some more numbers between $n$ and $m$. And therefore we tried to find solutions for $m^n=\overline{nAm}$, where $m, n\in\mathbf{N}_+$ and $A\in\mathbf{N}$.
We've looked around and tried multiple methods of this, but none of them seems to work. I would appreciate it if you give me your thoughts or solutions that point me the way.