Let $$a\cdot A=n=b\cdot B$$ where $A,B$ are integers
Now $\displaystyle \frac{b\cdot B}a=A$ which is an integer
As $(a,b)=1,a$ must divide $B\implies B=C\cdot a$ for some integer $C$
$\displaystyle\implies n=b\cdot B=b\cdot C\cdot a $
HINT:
Let the highest power of prime $p$ that divides $a$ is $A$
and the highest power of prime $p$ that divides $b$ is $B$
$\implies $ the highest power of prime $p$ that divides $(a,b)=$min$(A,B)$
As $(a,b)=1,$ min$(A,B)=0$
If $A>0,B$ must be $0$ and vice versa
$\implies $ the highest power of prime $p$ that divides $b\cdot a$ must be $A+0$
If the highest power of prime $p$ that divides $n$ is $N$
As $a|n, N\ge A$
Clearly, this will hold true for any prime $q$ that divides $a$ or $b$