Let $\dfrac{a}{b}=\dfrac{a'}{b'}$ , $a,b,a',b' \in \mathbb{N}$ s.t. $a$ and $b$ have no common factors.
How can we show that the only solution to this equality is $a'=na$ and $b'=nb$, $n$ is a natural number. I know that $a'=na$ and $b'=nb$ is a valid solution of equation-1, because $(an)b=(bn)a$. But how can we prove that this is the only solution?
What I have tried is this:
Version 1. We know the two fractions $\dfrac{a}{b},\dfrac{a'}{b'}$ are equal iff $ab'=a'b\tag{1}.$ Let $ab'=a'b=c$. Now, $a$ and $b$ have no common factors means that they are coprime, so we have, $a=p_1p_2\cdots p_m$ and $b=q_1q_2\cdots q_n$. $p's$ and $q's$ are prime numbers and no $p$ is equal to any $q$. Equation 1 becomes $$(p_1p_2\cdots p_m)b'=(b_1b_2\cdots b_n)a'$$ By the Fundamental theorem of Arithmetic, both the sides should have same prime numbers, so $b'$ should contain $(b_1b_2\cdots b_n)$ and $a'$ should contain $(p_1p_2\cdots p_m)$, i.e. $b'=r(b_1b_2\cdots b_n)=rb$ and $a'=(p_1p_2\cdots p_n)s=sa$, where $r,s \in \mathbb{N}$. Now equation 1 becomes, $a(rb)=(sa)b$. This leaves the only possibility, $r=s$.
Version 2. The idea is basically the same as of version 1, but now I use Euclid's lemma in place of FTA. We know the two fractions $\dfrac{a}{b},\dfrac{a'}{b'}$ are equal iff $ab'=a'b\tag{1}.$ Let $ab'=a'b=c$. $a$ and $b'$ are the factors of $c$, so both of them divide $c$, i.e. $a|c$ and $b'|c$. Now $a|c \implies a|{(a'b)}$, by Euclid's lemma, $a$ divides at least one of $a'$ and $b$, but we know that $a$ doesn't divide $b$, so $a$ has to divide $a'$.
Similarly we can show that $b$ divides $b'$. So we have $a'=\alpha a$ and $b' = \beta b$, where $\alpha, \beta \in \mathbb{N}$. Substituting these in equation 1 gives $\alpha = \beta$.
Question
Is my method correct?
Is there any other method to prove that $a'=na$ and $b'=nb$ is the only solution of $\dfrac{a}{b}=\dfrac{a'}{b'}$; If yes then please explain.
Also if $a$ and $b$ have common factor then for what condition there does not exist any $n$ s.t. $a'=na$ and $b'=nb$ where $n$ is a natural number. E.g. $\dfrac 39 = \dfrac 26$
P.S: I've just improved my question. Barry's comment points a crucial error in my previous proof. I needed to justify $a|a'$ and $b|b'$. In previous proof I proceeded with proof by contradiction. The proof by contradiction was ok, but unnecessary, so I've replaced it with a direct proof. At the time of asking the question I lacked the knowledge of some introductory number theory concepts. Now I've learned them and soon I will ask in comments for further clarifications. Thank you.
I think your method is correct.
I have an other method: Let $\frac{a}{b}=\frac{a'}{b'}$. From that we can write $\frac{a}{a'}=\frac{b}{b'}$, than there exist a rational number $k$ s.t. $\frac{a}{a'}=\frac{b}{b'}=k$, so $a=a'k$ and $b=b'k$ or $a'=a\frac{1}{k}$ and $b'=b\frac{1}{k}$ or for $n=\frac{1}{k}$ we finally have $a'=na$ and $b'=nb$.
Updated: If (a,b)=1, and a'>a, b'>b, than we have the following: Suppose that $\frac{a}{b}=\frac{a'}{b'}$. From $\frac{a}{b}=\frac{a'}{b'}$ and (a,b)=1, we conclude that (a',b')=n where n is natural. Now, from (a',b')=n we can write a'=pn and b'=qn where (p,q)=1.So we have (p,q)=(a,b)=1 and $\frac{a}{b}=\frac{p}{q}$ ($\frac{a}{b}=\frac{a'}{b'}=\frac{pn}{qn}=\frac{p}{q}$)which can be true iff a=p and b=q. So finally we have that a'=na and b'=nb must be the only solution.