<s>[INST] Show that there exists no solution with $(x, y, z)$ ∈ $\mathbb N^+ × \mathbb N^+ × \mathbb N^+$ 
Show that there exists no solution with $(x, y, z)$ ∈ $\mathbb N^+ × \mathbb N^+ × \mathbb N^+$ for
(a) $5x^2 + 2y^2 = z^2$
(b) $17x^2 + 6y^2 = z^2$

My attempt:
a) if $5x^2 + 2y^2 = z^2$ has a solution in $\mathbb Z/n \mathbb Z$, then it has a solution in $\mathbb Z$.
mod $5$ : $2y^2 = z^2$
mod $2$ : $5x^2 = z^2$
Then in mod $5$: we have $y = 0$ mod $5$ and $z = 0$ mod $5$ iff $5|y$ in $\mathbb Z$ and $5|z$ in $\mathbb Z$
and $5^2|z^2-2y^2$ then $5^2|5x^2$ then $5|x^2$ then $5|x$
Assume that $(x,y,z)$ is a solution with $x>=0$, $y>=0$, $z>=0$ and $(x,y,z) \not= (0,0,0)$, then $\frac x5$, $\frac y5$, $\frac z5$ is a smaller positive solution. This contradicts the well-ordering principle.  Thus $5x^2 + 2y^2 = z^2$ can't have a solution $\not= (0,0,0)$
Is my attempt correct?
And do I solve part b the same as part a?
 [/INST] Well, for part (b) the method is the same. Suppose that $17^2+6^2=^2$ is the solution with smallest $x \in \mathbb{N}$. Then, the equation tells us that $2x^2 \equiv z^2 \pmod{3}$, and since any square is congruent to $0$ or $1$ modulo 3, we have that $x \equiv 0 \pmod{3} \Rightarrow z \equiv 0 \pmod{3}$, then $9\vert x^2$ and $9\vert z^2$. So, replacing $x^2=9a^2$ and $z^2=9b^2$, we obtain 
$
17\cdot9a^2+6y^2=9b^2
$,
which gives us that $3\vert y^2 \Rightarrow 9\vert y^2$. Replacing $y^2=9\cdot c^2$, we have $17\cdot9a^2+9\cdot 6 \cdot c^2=9b^2$, and by dividing by 9, we get a new solution $17a^2+6b^2=c^2$  to the given diophantine equation, where $a<x$. So, the conclusion follows. 
</s>