Look at the picture.
For XY and ZX use the Pythagorean theorem.
The perimetero fo XYZ:
4.7m questions
6.1m answers