Pythagoras' theorem connects the lengths of two sides of a right-angled triangle with the length of the third side. It only works with right-angled triangles.
Pythagoras' theorem is
r2 = x2 + y2
Where r is always the side opposite the right angle,
and x and y are the other two sides.
Phythagoras' theorem can be rearranged to find any of the three sides of a triangle. Remember that the length is not r2 but it is r (i.e. don't forget to root the answer).