The cosine rule extends Pythagoras' Theorem to all triangles.
CosineRule.png?
With side lengths and angles as in the above diagram then:
(and the same with other permutations of the letters)