well, to find what that middle point is on XZ
[tex]\bf \textit{middle point of 2 points }\\ \quad \\
\begin{array}{lclclll}
&x_1&y_1&x_2&y_2\\
% (a,b)
&X({{ -1}}\quad ,&{{ 4}})\quad
% (c,d)
&Z({{ 5}}\quad ,&{{ 2}})
\end{array}\qquad
% coordinates of midpoint
\left(\cfrac{{{ x_2}} + {{ x_1}}}{2}\quad ,\quad \cfrac{{{ y_2}} + {{ y_1}}}{2} \right)[/tex]
once you found that, then use it in the distance equation
[tex]\bf \textit{distance between 2 points}\\ \quad \\
\begin{array}{lcllll}
&x_1&y_1&x_2&y_2\\
% (a,b)
&Y({{ -2}}\quad ,&{{ -3}})\quad
% (c,d)
&({{ \square }}\quad ,&{{ \square }})
\end{array}\qquad
% distance value
d = \sqrt{({{ x_2}}-{{ x_1}})^2 + ({{ y_2}}-{{ y_1}})^2}[/tex]