So I understand the majority of the proof, but am not fully following why consequently $n^2=9a^2$. Is this because we can take our value for $n$ (which is $n=3a$) and square it, which gives us $9a^2$?
I'm almost positive that's what it is, but it seems like such a loose relationship to me. Just want to make sure I'm fully understanding it.
9. Proposition Suppose $n\in\Bbb Z$. If $3\nmid n^2$, then $3\nmid n$.
Proof. (Contrapositive) Suppose it is not the case that $3\nmid n$, so $3\mid n$. This means that $n=3a$ for some integer $a$. Consequently $n^2=9a^2$, from which we get $n^2=3(3a^2)$. This shows that there is an integer $b=3a^2$ for which $n^2=3b$, which means $3\mid n^2$. Therefore it is not the case that $3\nmid n^2$. $\blacksquare$