Since X and Y are on the same vertical line, the distance between them is the difference of their y-coordinates: 6 - 3 = 3.
Since Y and Z are on the same horizontal line, the distance between them is the difference of their x-coordinates: 6 - 1 = 5.
The segment XZ is the hypotenuse of a right triangle with sides 3 and 5, so its length is
.. XZ = √(3^2 +5^2) = √34
XY = 3
YZ = 5
XZ = √34 ≈ 5.83095