This is a $\rm\color{#0a0}{multiplicative}$ form of the following well-known $\rm\color{#90f}{additive}$ result about reduced fractions. A proof follows immediately by translating from additive to multiplicative form $\,n\cdot x\to x^n,\,$ i.e.
If $\,\ \overbrace{\gcd(a,b)=1}^{\textstyle aj+bk\,=\,1}\ $ then $\,\ \overset{\rm\large Unique\ Fractionization_{\phantom{|}}\!}{\bbox[5px,border:1px solid red]{\dfrac{y}x = \dfrac{a}b\:\Rightarrow\begin{align}\,y = na\\ x = nb\end{align}}}\ \ \ {\rm for\ some}\,\ n\in\Bbb Z, \, $ with proof as below
$\ \ \begin{align}
\color{#c00}{xa=yb}\,\Rightarrow\,x &= \color{#c00}x(\color{#c00}aj\!+\!bk) = (\color{#c00}yj\!+\!xk)\color{#c00}b = n b\ \ \ \ \color{#90f}{\text{[additive]}}\\[.3em]
\color{#c00}{x^{\Large a}= y^{\Large b}}\Rightarrow\,x &= \color{#c00}x^{\Large \color{#c00}aj\,+\,kb}\ =\ (\color{#c00}y^{\Large j}\! \cdot x^{\Large k})^{\Large \color{#c00}b} = n^{\Large b}\ \ \ \color{#0a0}{\text{[multiplicative]}}
\end{align}$
Note $\, n = y^{\large j} x^{\large k}\,$ is a rational root of $\,n^{\large b} = x\in\Bbb Z,\,$ so $\,n\in\Bbb Z\,$ by the Rational Root Test.
Remark $ $ The analogy between additive and multiplicative forms is clarified when we study abelian groups as $\,\Bbb Z\!\!-\!\!\text{modules}$. Said fundamental result about principality of fractions is sometimes called Unique Fractionization to emphasize its equivalence with uniqueness of prime factorizations.