Uncertainty of process used in simple proof that there exists no rational number whose square is 2. Hardy goes on by saying that suppose $\frac {p^2}{q^2}=\frac mn,$ where $p$ has no factor in common with $q,$ and $m$ no factor in common with $n.$ Then $n{p^2}=mq^2$. 
Here is where I get confused.
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= \lambda q^2$, where $\lambda$ is an integer. But this involves $m=\lambda p^2$. and as m and n have no common factor, $\lambda $ must be unity. Thus $m = p^2, n = q^2$.
I'm just really having trouble understanding the though process here even though it's something probably extremely simple.
 A: Hardy essentially reproves a well-known property about the uniqueness of reduced (lowest-terms) fractions, viz. the Theorem below (sometimes called unique fractionization).
Theorem $\ $ For $\rm\:m,n,x,y\in \Bbb Z,\,$ if $\rm\ gcd(m,n) = 1,\:$ then $\rm\ \dfrac{x}y\, =\, \dfrac{m}n\ \Rightarrow\:\begin{array}{c}x\, =\, k\,m\\ \rm y\, =\, k\,n\end{array}\ \ $ for some $\rm\ k\in \Bbb Z$
Proof $\ $ By Euclid's Lemma, $\rm\ gcd(n,m)=1,\ nx = my\,\Rightarrow\,n\mid y,\:$ so $\rm\ \dfrac{x}m = \dfrac{y}n = k,\:$ for some $\rm\:k\in \Bbb Z.$
Remark $\  $ Hardy's result is the special case where $\rm\:gcd(x,y) = 1\:$ hence $\rm\:k = \pm1,\:$ i.e. two reduced fractions are essentially unique (we can force $\rm\:k = 1\:$ by requiring denominators to be positive). 
The theorem can also be proved by Euclidean descent on denominators, and such a proof is often directly "inlined" in irrationality proofs (vs. being called by name). For an example of such, see the irrationality proofs by John Conway and Bill Dubuque in a prior thread here.
Note: The theorem is equivalent to Euclid's Lemma, since if $\rm\:gcd(n,m)=1\:$ and $\rm\:n\mid my,\:$ then $\rm\: nx = my,\:$ for some $\rm\:x\in \Bbb Z,\:$ so $\rm\:m/n =x/y\:$ so $\rm\:n\mid y\:$ by unique fractionization.
Unique fractionization $\!\iff\!$ unique factorization in domains like $\,\Bbb Z\,$ where ever nonunit $\ne 0$ has a factorization into atoms (irreducibles), since the primality of atoms is an immediate consequence of Euclid's Lemma or unique fractionization.
A: Hardy is saying that if $$\frac p q$$ is in reduced form, then so is $$\frac{p^2}{q^2}$$
Essentially, if you try to write $\frac{p^2}{q^2} = \frac m n$ then $n$ must be a multiple of $q^2$.
In particular, then, if $\frac{p^2}{q^2}$ is an integer, then $n=1$ and hence $q^2=1$ so $q=\pm 1$ and $\frac p q$ is an integer.
That means $\sqrt 2$ is rational only if $p^2=2$ has a root for some integer $p$.
The nice thing about Hardy's proof is that you can use it to prove more generally that if $D$ is not the square of an integer, then $\sqrt{D}$ is not rational.
