Let $x$, $y$, $n$ be natural numbers and $(x,y)=1$ (the greatest common divisor of $x,y$ is 1). I wish to prove that if $\sqrt[n]\frac{x}{y}$ is a rational number then there are natural numbers $p$, $q$ such that $x=p^n$ and $y=q^n$.
My attempt.
If $\sqrt[n]\frac{x}{y}=\frac{a}{b}$ and $(a,b)=1$ then $\frac{x}{y}=\frac{a^n}{b^n}$ and next $xb^n=ya^n$. Hence $x|xb^n=ya^n$ but $(x,y)=1$. Therefore $x|a^n$. Similarly $y|b^n$, $b|y$, $a|x$. I don't know how to obtain that $x$ and $y$ are $n$-th powers of natural numbers.
You missed just one little step. As you said $x\mid a^n$ and $y\mid b^n$. Now, $a^n\mid xb^n$ and since $(a,b)=1$, we have that $(a^n,b^n)=1$ and thus $a^n\mid x$. So $a^n\mid x \mid a^n$ implies $x=\pm a^n$. Same for $y$.