If $a^{m}=b^{m}$ and $a^{n}=b^{n}$, show that a=b 
Question: Suppose that a and b belongs to an integral domain.
  If $a^{m}=b^{m}$ and $a^{n}=b^{n}$, where m and n are positive integers that are relatively prime, prove that a=b.

Well, m and n are relatively prime so gcd(m,n)=1 holds.
In fact, from the fact that the gcd of any positive integers: gcd(m,n)=1=ms+nt for some integers s,t. 
Raising the element a to ms+nt:
$a^{ms+nt}=a$
A good bit of hint here would be helpful.
Thanks in advance.
 A: Hint $ $  In the quotient field $\,(a/b)^m = 1 = (a/b)^n\,$ so the order $\,d\,$ of $\, a/b\,$ divides the coprimes $\,m,n\,$ thus $\,d=1,\,$ so $\,a/b = 1,\,$ so $\,a=b.$ 
A: If you haven't covered fields of fractions yet you can use the fact that cancellation law holds in integral domains instead. 
Anyway, you know that there exist integers $s$ and $t$ such that $ms+nt=1$. Necessarily then one of them is negative and the other is positive. Moving the negative term to the other side, and interchanging $m,n$ if needed, we can rewrite that to read
$$
mu=1+nv
$$
for some positive integers $u,v$. Then
$$
a\cdot a^{nv}=a^{1+nv}=a^{mu}=(a^m)^u=(b^m)^u=b^{mu}=b^{1+nv}=b\cdot(b^n)^v=b\cdot a^{nv},
$$
and you get the claim by cancelling the factor $a^{nv}$. Leaving the case $a^{nv}=0$ to you :-)
A: If $ms+nt=1$, then:
$a = a^1 = a^{(ms+nt)} = a^{ms}a^{nt} = (a^m)^s (a^n)^t = (b^m)^s (b^n)^t = b^{ms}b^{nt} = b^{(ms+nt)} = b^1 = b$.
We must interpret $a$ and $b$ as belonging to the field of fractions $\kappa(R)$ here, since the powers $ms,nt$ etc. may possibly be negative. You can still work around this : for example by transferring the negative term to the other side etc.
