This is a right triangle, so the Pythagorean Theorem can be applied:
The sum of the squares of the lengths of the legs (5 and 5) equals the square of the length of the hypotenuse (z).