My final is today and I need help!

Prove the theorem: The only solutions in non-negative integers of the equation x^2+2y^2=z^2, with gcd(x, y, z)=1 are given by x=+-(2s^2-t^2), y=2st, z=2s^2+t^2 where s,t are arbitrary nonnegative integers.

**hint: if u,v,w are such that y=2w, 2+x=2u, z-x=2v, thenthe equation becomes 2w^2=uv.

I could only goes as far is to prove that hint, but I got stuck after that:

From the hint, we have x^2+2y^2=z^2 implies 2y^2=z^2-x^2=(z-x)(z+x), which implies 2(2w)^2=(2u)(2v),

which implies 8w^2=4uv,

which implies 2w^2=uv, thus proving the hint.

where do I go from here