In a right triangle, if we draw an altitude, from the vertex which contains the right angle, to its opposite side, the triangles at both sides of this altitude are congruent and hence congruent to the whole triangle.
The above is called the Right angle altitude theorem.
In PYthagorean theorem, we use the above theorem to prove the proportionate values are equal.