Let $R$ be a ring with with no zero divisors. If $a, b \in R$ are such that $a^m = b^m$ and $a^n = b^n$, where $m$ and $n$ are relatively prime positive integers, then show that $a = b$.
My attempt: Let $m>n$. $\therefore a^na^{m-n}= b^nb^{m-n}$ or, $ a^{m-n} = b^{m-n}$. How do I proceed from here?