The right triangle is divided into two similar right triangles by the altitude, which is the side I named "h" in the sketch above. The hypotenuse of the triangle was divided into two segments "x" and "n". These segments have the following relationship with respect to the altitude:
Given that we know the measures of "h" and "n" we can determine the measure of "x"
For h=12 and n=8:
Multiply both sides by 12:
Now that we know the value of x, using the Pythagorean theorem we can determine the value of y. For the triangle on the left, the side "y" represents the hypothenuse:
This theorem states that the square of the hypothenuse of a right triangle is equal to the sum of the squares of the sides of the triangle, then:
For our triangle:
To determine the measure of side "z" you have to use the same method, considering the right triangle on the right, this side represents the hypothenuse. Use the Pythagorean theorem to calculate its length:
The sides of the triangle are h=12 and n=8