First solution
Remark(1): Suppose that we can write the integer $r$ in the form $2Y^2-X^2$;
then we can conclude that each prime factor of $r$;
which is of the type $8k \pm 3$,
must divides $r$, by an even power.
In other words if $p \overset{8}{\equiv} \pm 3$ and
$p^ \alpha \mid r$ and $p^ {\alpha+1} \nmid r$,
then there is an integer $\beta$ such that: $\alpha=2\beta$.
Moreover in this situation every solution of $2Y^2-X^2=r$ has the form:
$X=p^ \beta X^ {\prime}$, $Y=p^ \beta Y^ {\prime}$
for some integers $X^{\prime}$ and $Y^{\prime}$.
List of the prime numbers of the form $8k + 1$ are as follows:
$$17, 41, 73, 89, 97, ... \ \ \ ,$$
and the list of the prime numbers of the form $8k + 7$ are as follows:
$$7, 23, 31, 47, 71, 79, ... \ \ \ .$$
Without loss of generality we can assume that:
$x_i^2 < y_i^2 < z_i^2$,
so we must have $x_i^2 + z_i^2 = 2y_i^2$;
so we have $z_i^2 = 2y_i^2 -x_i^2$ and $x_i^2 = 2y_i^2 -z_i^2$.
The minimum positive possible values for $(x_i,z_i)$ is equal to
$$(1,7); \ (7,17); \ (7,23); \ ... , $$
so $z_0=7$, $z_1=17$, $z_2=23$.
Second solution
Remark(2):
Let's remember that a parametric solution
to the equation $x^2+y^2=z^2$ is given by:
$$
\left\{ \begin{array}{lcc}
x=d(m^2-n^2) \ ,
\\
y=d(2mn) \ ,
&
\\
z=d(m^2+n^2) \ ,
\\
\end{array}
\right.$$
where $m$ and $n$ are relatively prime integers with different pairity.
Remark(3):
Now lets consider the equation $x^2+y^2=2z^2$;
multiplying both sides by $2$ turns out:
$$
(x+y)^2+(x-y)^2=
2(x^2+y^2)=
2(2z^2)=
(2z)^2 . $$
Leting $x+y=d^{\prime}(m^2-n^2)$,
$x-y=d^{\prime}(2mn)$ and $2z=d^{\prime}(m^2+n^2)$;
and by a simple concusion
we obtain the following parametric solution
to the equation $x^2+y^2=2z^2$:
$$
%% \left\{ \begin{array}{lcc}
%% x= \dfrac {d (m^2-n^2+2mn) }{2}
%% = \dfrac {d \big( (m+n)^2-2n^2 \big) }{2} \ ,
%% \\
%% y= \dfrac {d (m^2-n^2-2mn)}{2}
%% = \dfrac {d \big( (m-n)^2-2n^2 \big) }{2} \ ,
%% &
%% \\
%% z= \dfrac {d(m^2+n^2)}{2} \ ,
%% \\
%% \end{array}
%% \right.$$
$$
\left\{ \begin{array}{lcc}
x= d (m^2-n^2+2mn)
= d \big( (m+n)^2-2n^2 \big) \ ,
\\
y= d (m^2-n^2-2mn)
= d \big( (m-n)^2-2n^2 \big) \ ,
&
\\
z= d(m^2+n^2) \ ,
\\
\end{array}
\right.$$
where $m$ and $n$ are relatively prime integers with different pairity.
So your problem reduces
to minimizing the quantity
$$\max \{ \ (m+n)^2-2n^2 \ , \ \ (m-n)^2-2n^2 \ \} . $$
after a simple computation you can get:
$$(m, n)=(2, 1) \rightarrow (1, 7; 5), $$
$$(m, n)=(3, 2) \rightarrow (7,17;13), $$
$$(m, n)=(4, 1) \rightarrow (7,23;17). $$
Third solution: By using the primitivity assumption,
we can conclude by an easy modular arithmetic module $8$,
that $r \overset{8}{\equiv} \pm 1$,
so it only suffices to search thorough the integers $x_i$ and $z_i$ among the following list:
$$1, 9, 17, 25, ..., $$
$$7, 15, 23, ..., .$$
[For example note that $15$ is immpossible by lemma(1).]