$x^2+y^2=2z^2$, positive integer solutions

Just a start:

Note that $$\left(\frac{x-y}{2}\right)^2 + \left(\frac{x+y}{2}\right)^2=\frac{x^2+y^2}{2}=z^2.$$

And $\frac{x-y}{2}$ and $\frac{x+y}{2}$ are integers (why?)

So you need to find solutions to $u^2+v^2=z^2$.


From Brahmagupta-Fibonacci Identity: $${\left( {p}_{2}\,{s}_{2}+{p}_{1}\,{s}_{1}\right) }^{2}+{\left( {p}_{1}\,{s}_{2}-{s}_{1}\,{p}_{2}\right) }^{2}=\left( {p}_{2}^{2}+{p}_{1}^{2}\right) \,\left( {s}_{2}^{2}+{s}_{1}^{2}\right)$$ get: $${\left( {p}_{2}\,{s}_{2}\,{t}_{2}+{p}_{1}\,{s}_{1}\,{t}_{2}+{p}_{1}\,{t}_{1}\,{s}_{2}-{s}_{1}\,{t}_{1}\,{p}_{2}\right) }^{2}+{\left( {p}_{1}\,{s}_{2}\,{t}_{2}-{s}_{1}\,{p}_{2}\,{t}_{2}-{t}_{1}\,{p}_{2}\,{s}_{2}-{p}_{1}\,{s}_{1}\,{t}_{1}\right) }^{2}=\left( {p}_{2}^{2}+{p}_{1}^{2}\right) \,\left( {s}_{2}^{2}+{s}_{1}^{2}\right) \,\left( {t}_{2}^{2}+{t}_{1}^{2}\right)$$ and get solution: $${\left( {p}_{2}\,{t}_{2}^{2}+2\,{p}_{1}\,{t}_{1}\,{t}_{2}-{t}_{1}^{2}\,{p}_{2}\right) }^{2}+{\left( {p}_{1}\,{t}_{2}^{2}-2\,{t}_{1}\,{p}_{2}\,{t}_{2}-{p}_{1}\,{t}_{1}^{2}\right) }^{2}=\left( {p}_{2}^{2}+{p}_{1}^{2}\right) \,{\left( {t}_{2}^{2}+{t}_{1}^{2}\right) }^{2}$$


Though others have posted simple solutions to the problem but if you want to proceed the way you did then here it is:

First let $\dfrac xz = a$ and $\dfrac yz = b$. This reduces problem to two variables (which are rational numbers).
Now we have $(b+1)(b-1)=(1+a)(1-a)$
which means $${b+1\over1+a} ={ 1-a\over b-1}$$ Let this fraction be $\dfrac mn$ in reduced form. From this we get 2 linear equations in 2 variables (in terms of a and b). Solving those will give
$$a = \frac{(n² + 2mn - m²)}{(m² + n²)}$$
$$b = {(m² + 2mn - n²)\over(m² + n²)}$$
Substituting values of a and b back gives the solution to original problem: $$x = n² + 2mn - m²$$ $$y = m² + 2mn - n²$$ $$z = m² + n²$$