Suppose you have the right triangle shown below:


The Pythagorean theorem says that Leg1^2 + Leg2^2 = Hypothenuse^2, where Leg1 is the length of Leg1, etc.