Solve in positive integers $x^2+3y^2=z^2$ and $x^2+y^2=5z^2$ Solve the following equations in postive integers:

*

*$x^2+3y^2=z^2$


*$x^2+y^2=5z^2$
I have solved them using this as a reference, but I am interested in other solutions, more "elegant" ones.
The equations are to be solved separate!!!

People are not careful with these. With $x^2 + 3 y^2 = z^2;$ with odd $z,$ we indeed get
$$ (r^2 - 3 s^2)^2 + 3(2rs)^2 = (r^2 + 3 s^2)^2. $$ This does not give primitive solutions with even $z,$ which come from
$$ \left( \frac{r^2 - 3 s^2}{2} \right)^2 + 3 (rs)^2 = \left( \frac{r^2 + 3 s^2}{2} \right)^2  $$ with both $r,s$ odd
For $x^2 + y^2 = 5 z^2$ primitive means $z$ odd, we take $x$ to be the even one.
$$ (2u^2 - 2 u v - 2 v^2)^2 + (u^2 + 4 uv - v^2)^2 = 5 (u^2 + v^2)^2 $$
