The hypotenuse is opposite the right angle. If its length is \(c\) and the legs are \(a,b\), then \(a^2+b^2=c^2\).
Place four congruent right triangles in a square of side \(a+b\), leaving a central square of side \(c\). The large area is \(4(ab/2)+c^2\). Expanding \((a+b)^2\) and subtracting \(2ab\) gives \(a^2+b^2=c^2\).
When the hypotenuse and one leg are known, subtract the known leg's square from the hypotenuse's square. Take the positive square root.