I found the following argument in a textbook that uses a number theory approach. However I do not understand the last two sentences that seems to use some number theory properties, can someone please help explain them?
Let $$ a^2 = 2b^2, \quad (a,b)=1, \quad a,b\in \mathbb{N} $$
Rearranging, $$ b^2 = (a+b)(a-b) $$
Let $p$ be a prime factor of $b$, then $$ p \mid (a+b)\quad or\quad p\mid (a-b) $$
If $p$ divides any of the above, then $p$ divides both of them, hence $p$ must divide $a$. Then $p$ would be a common divisor of $a$ and $b$, a contradiction.