Say m contains the prime factor p^i and n contains the prime factor p^j, then m^n will contain p^in and n^m will contain p^jm. For them to be equal we need in = jm or i/j = m/n but for a given solution m/n is constant and the prime factor multiplicity ratio must be equal to that. And that applies to all prime factors, their multiplicities must all have the same constant ratio, therefore the smaller of the two numbers must have smaller multiplicity for all prime factors and therefore divide the larger number. There is probably a simpler way to say this, this feels too complicated.