Show that there are no primitive pythagorean triple $(x,y,z)$ with $z\equiv -1 \pmod 4$.
I once have proven that, for all integers $a,b$, we have that $a^2 + b^2$ is congruent to $0$, or $1$, or $2$ modulo $4$. I feel like it is enough to conclude it by considering $a=x$, $b=y$ and $\gcd(x,y)=1$. But I am not completely sure if it is the way the proof should end.
If you have proven for all integers $a, b$ this property holds, then yes it follows immediately that it holds for the subset of those integer pairs for which $\gcd(a,b) = 1$.