I have been working through the following proof:
Use proof by contradiction to prove that if $a$ and $b$ are odd integers, then $4 \nmid (a^2+b^2)$.
Below, I have included screenshots of the solutions manual to my text book. I am unclear about what happens between steps 3 and 4 (below).
Would someone be able to help me clarify what is happening between steps 3 and 4? I don't fully understand why we are moving the $4x$ over to the right hand side of the equation (I checked to see if $4x$ was replacing something, but that doesn't seem to be the case). Furthermore, I do not understand why "$4(\text{integer})+2$" concludes that "$2 \mid 4$". Since the proof shows that the $4x$ has been moved over, what is implied by the left-hand side of the equation? I fully understand the proof up to that point. Additionally, if someone has an alternative suggestion for how to prove this (via contradiction), I would appreciate it.




Clarification of this proof:
I think a 4 is missing before the first is-sign. Then we would get $$4 = 4x-4y^2-4y-4z^2-4z+2$$
Which is consistent with $4x = 4y^2+4y+4z^2+4-2$.
Then the equation is written as $$4 = 4 \times \mathrm{int}+2$$
$$4 = 2 \times 2 \times\mathrm{int}+2$$
$$4 = 2 \times (2 \times\mathrm{int}+1)$$
$$4 = 2 \times a$$
Here we have that $a$ is odd, so $\gcd(4,a)=1$. Hence we must have $4 \mid 2$, contradiction.
Another way:
Odd numbers are $x \equiv 1,3 \mod 4$
If $x \equiv 1 \mod 4$ then $x^2 \equiv 1 \mod 4$.
If $x \equiv 3 \mod 4$ then $x^2 \equiv 1 \mod 4$.
Thus odd squares are $x^2 \equiv 1 \mod 4$. Thus the sum of two odd squares is 2 mod 4.