It can be shown that that for $x,y,z \in \mathbb{N}_{>0}$ the Pythagorean equation $x^2 + y^2 = z^2$ has the general solution $x = 2grs$,$y = g(r^2 - s^2)$ and $z = g(r^2+s^2)$ with $g>0, r>s>0$ and $(r,s) = 1$ and $r,s$ not both odd.
I am trying to prove now that the integer solutions to $x^2+y^2=z^2$ with $(x,y,z) =1$ are in $1$-to-$1$ correspondence with the rational solutions $u,v$ to $u^2+v^2 = 1$. I cannot really see where to start from here ...
"To start from here", consider a solution of $x^2+y^2=z^2$. If $z=0$, then $x=y=0$, which is not in positive integers. Hence we can divide by $z^2$ and obtain $$ \left(\frac{x}{z}\right)^2+\left(\frac{y}{z}\right)^2=1. $$ This gives $u^2+v^2=1$. Conversely, suppose that there are $r,s\in \Bbb Q$ with $r^2+s^2=1$. Then writing $r=x/z$ and $s=y/w$ we have $$ \left(\frac{x}{z}\right)^2+\left(\frac{y}{w}\right)^2=1. $$ Multiplying with $(zw)^2$ we obtain $$ (wx)^2+(yz)^2=(zw)^2. $$ Hence $(wx,yz,zw)$ is a Pythagorean triple.
If we start with a primitive Pythagorean triple, and pass through the rational solution then we obtain back the triple $(zx,zy,z^2)$, which we have to rescale to obtain the bijection.