<s>[INST] if $x$ is rational and $x^2$ is natural, prove that $x$ is integer If $x$ is rational: There exists $\frac{a}{b}$ such that $a$, $b$ are integers.
If $x^2$ is natural:
$\left(\frac{a}{b}\right)^2$ is natural => $\frac{a^2}{b^2}$ is natural
Then $a^2$ divides $b^2$ => $a$ divides $b$
If $a$ divides $b$ and $a$, $b$ are integers, $\frac{a}{b}$ is integer
so $x$ is integer.
 [/INST] As noted in the comments, you mean to write "$b^2$ divides $a^2$" in your third line. I wouldn't jump immediately from that to concluding though. So $b^2|a^2$ so there exists a $k$ such that $b^2k=a^2$.

Lemma: Let $x$ and $y$ be natural numbers. If $xy$ is a perfect square, then it is not the case that exactly one of $x$ and $y$ are perfect squares.

From this lemma, we see that $k$ must be a perfect square, so $k=\ell^2$. Now we can write $(b\ell)^2=a^2$ and conclude that $b\ell=a$, so $b|a$.
</s>