Firstly, we need to find where midpoint Y is. Plug in points X and Z into the midpoint formula to solve as such:
[tex] Y=(\frac{-2+(-8)}{2},\frac{4+(-6)}{2})\\\\Y=(\frac{-10}{2},\frac{-2}{2})\\\\Y=(-5,-1) [/tex]
Now that we have the coordinates of Y, plug in points X and Y into the distance formula to find out their lengths as such:
[tex] XY=\sqrt{(-2-(-5))^2+(4-(-1))^2}\\XY=\sqrt{3^2+5^2}\\XY=\sqrt{9+25}\\XY=\sqrt{34}\approx 5.8 [/tex]
XY is approximately 5.8 units.