Here is a copy of Hardy's proof:
For suppose, if possible, that $p^2/q^2 = m/n$, $p$ having no factor in common with $q$, and $m$ no factor in common with $n$. Then $np^2 = mq^2$. Every factor of $q^2$ must divide $np^2$, and as $p$ and $q$ have no common factor, every factor of $q^2$ must divide $n$. Hence $n = λq^2$, where $λ$ is an integer. But this involves $m = λp^2$: and as $m$ and $n$ have no common factor, $λ$ must be unity. Thus $m = p^2$, $n = q^2$, as was to be proved. In particular it follows, by taking $n = 1$, that an integer cannot be the square of a rational number, unless that rational number is itself integral.
I understand the reasoning that gets us to this point, but I don't understand what $m = p^2$, $n = q^2$ tells us about anything at all related to the original goal of the proof, which is in Hardy's words:
In fact we may go further and say that there is no rational number whose square is $m/n$, where $m/n$ is any positive fraction in its lowest terms, unless $m$ and $n$ are both perfect squares.