I want to know in which situations two numbers that can be expressed as powers can be equal. I think it's intuitive that if two powers (say $a^b$ and $c^d$) are equal, then the bases must be themselves powers of a single natural number (say $a=m^k$ and $c=m^l$, so that $m^{kb}=m^{ld}$, and $kb=ld$). But I'm having a hard time proving it.
My approach is as follows: I factor $a$ and $c$ into prime factors and write the equation $a^b=c^d$ as: $$\left({p_1}^{a_1} {p_2}^{a_2} \cdots {p_n}^{a_n}\right)^b=\left({p_1}^{c_1} {p_2}^{c_2} \cdots {p_n}^{c_n}\right)^d$$ (where $p_1=2$, $p_2=3$, $p_3=5$, etc are the prime numbers) which turns into the following system: $$a_1 b = c_1 d \\ a_2 b = c_2 d \\ \vdots \\ a_n b = c_n d$$ I want to prove that the vectors $\left[a_1,a_2,\ldots,a_n\right]$ and $\left[c_1,c_2,\ldots,c_n\right]$ are both integer multiples of some other vector. It's ok to assume that the mdc's of boths lists are $1$, because if, say, $\mathrm{mdc}\left\{a_1,a_2,\ldots,a_n\right\}=k>1$, then we could factor out $k$ from the $a_j$'s and incorporate it into $b$ (this is the same as reducing $a^b$ to $m^{kb}$). Assuming that the mdc's are $1$, I want to prove that the vectors for $a$ and $c$ are equal.
I don't where to go from here. I can do it in the case that the mdc's are pairwise $1$, that is, $\mathrm{mdc}\left\{a_1,a_2\right\}=\mathrm{mdc}\left\{a_1,a_3\right\}=\cdots=\mathrm{mdc}\left\{a_{n-1},a_n\right\}=1$, but not in the general case.
You notice the fact about the gcd's (i.e., mdc's) of the numbers $a_i$ and $c_i$. The key here is to notice that $b$ and $d$ can also be assumed relatively prime (if they have gcd equal to $k$, then take the $k$th root of both sides of $a^b = c^d$ to reduce to the case where the exponents are relatively prime.)
Now the key fact is known as Euler's Lemma: if $b$ and $d$ are relatively prime and $b$ divides evenly into $md$, then $b$ is a divisor of $m$.
Assuming this, we find from $a_i b = c_i d$ that $b$ is a divisor of $c_i d$, so by Euler's Lemma is a divisor of $c_i$ for all $i$. Similarly, $d$ is a divisor of $a_i$ for all $i$. Dividing all of the equations $a_i b = c_i d$ by $b$, we find $a_i = e_i d$ for some integers $e_i$. Substituting this into $a_i b = c_i d$ and dividing by $d$, we find as well that $c_i = e_i b$ for all $i$. Thus, the vectors $[a_1, \ldots, a_n]$ and $[b_1, \ldots, b_n]$ are both multiples of $[e_1, \ldots e_n]$.