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 $\rm\color{darkorange}{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{\bf\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}\,\ \color{#0af}{n\in \Bbb Z}\ (\rm vs. \Bbb Q)$
$\!\begin{align}
{\bf Proof}\ \ \ \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]
{\Large\color{darkorange}{\leadsto}}\ \ \ \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}$
$ n = y^{\large j} x^{\large k}\!\in\Bbb Q\,$ is a rational root of $\,n^{\large b} = x\in\Bbb Z,\,$ so $\,\color{#0af}{n\in\Bbb Z}\,$ by Rational Root Test.
Generally, ignoring final line $\rm\color{#0af}{using\ RRT}$, the proof shows that in any abelian (commutative) group we have: $\ z = x^a = y^b \,\Rightarrow\, x = n^b,\,$ for $\, n = y^jx^k,\,$ so $\,z = x^a = n^{ab},\,$ i.e.
Theorem $ $ If $\:\!z\:\!$ is both an $\:\!\color{#c00}a$'th & $\:\!\color{#c00}b$'th power then $\:\!z\:\!$ is an $\color{#c00}{ab}$'th power, if $\,a,b\,$ are coprime.
[note $\color{darkorange}{\rm C}$ = commutativity is used: $\,x^{aj+kb} = (\color{#c00}{x^a})^j x^{kb}\! = (\color{#c00}{y^b})^j x^{kb} \overset{\color{darkorange}{\rm C^{\vphantom |}}}= (y^j x^k)^b\! = n^n$].
The above analogy between additive and multiplicative forms will be clarified when one studies group theory and $\:\!\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.