Law of cosines?
If a triangle has sides of length a, b and c and the angle opposite side a is A then the law of cosines says
a2 = b2 + c2 - 2*b*c*cos(A)