[step:Parametrize the primitive Pythagorean triple]
Because $\gcd(x,y)=1$ and $x^2+y^2=z^2$, exactly one of $x,y$ is even. Interchanging $x$ and $y$ if necessary, assume $x$ is odd and $y$ is even.
[claim:Primitive Pythagorean triples have Euclid parameters]
There exist positive integers $m,n \in \mathbb{N}$ such that
\begin{align*}
m>n,
\qquad
\gcd(m,n)=1,
\qquad
m \not\equiv n \pmod 2,
\end{align*}
and
\begin{align*}
x=m^2-n^2,
\qquad
y=2mn,
\qquad
z=m^2+n^2.
\end{align*}
[/claim]
[proof]
Since $x$ is odd, both $z-x$ and $z+x$ are even. Define positive integers
\begin{align*}
u := \frac{z+x}{2},
\qquad
v := \frac{z-x}{2}.
\end{align*}
Then
\begin{align*}
uv
=
\frac{(z+x)(z-x)}{4}
=
\frac{z^2-x^2}{4}
=
\frac{y^2}{4}
=
\left(\frac{y}{2}\right)^2.
\end{align*}
Also $\gcd(u,v)=1$. Indeed, if a prime $p$ divides both $u$ and $v$, then $p$ divides $u+v=z$ and $u-v=x$, contradicting $\gcd(x,z)=1$, which follows from $\gcd(x,y)=1$ and $x^2+y^2=z^2$.
Since $u$ and $v$ are coprime and their product is a square, prime factorization gives positive integers $m,n \in \mathbb{N}$ with
\begin{align*}
u=m^2,
\qquad
v=n^2.
\end{align*}
Because $u>v$, we have $m>n$. Hence
\begin{align*}
z+x=2m^2,
\qquad
z-x=2n^2.
\end{align*}
Adding and subtracting these equations gives
\begin{align*}
z=m^2+n^2,
\qquad
x=m^2-n^2.
\end{align*}
Finally,
\begin{align*}
y^2=z^2-x^2=(z-x)(z+x)=4m^2n^2,
\end{align*}
so $y=2mn$.
If a prime $p$ divides both $m$ and $n$, then $p^2$ divides both $u$ and $v$, contradicting $\gcd(u,v)=1$. Thus $\gcd(m,n)=1$. If $m$ and $n$ had the same parity, then both would be odd, and $x=m^2-n^2$ would be even, contradicting that $x$ is odd. Therefore $m$ and $n$ have opposite parity.
[/proof]
[/step]