
Here's how:
Draw a triangle ABC, and label the sides opposite each angle a, b, c. Make it
so the horizontal "base" is the side labeled a.
Draw an altitude from the base, a, to the apex, A. Label the altitude c
sin B.
The altitude divides the base, a, into two segments of length c cos B and a 
c cos B.
Now Pythagoras gives us b² = (a  c cos B)² + (c sin B)²
Multiply out the squares to get b² = a²  2ac cos B + c² cos² B + c² sin² B
Collect the c² cos² B and the c² sin² B to make c², so you have b² = a²  2ac cos B + c²
This is the final result: b² = a² − 2ac cos B + c² 
Does that seem like a lot of work? Maybe, but it's the sort of thing you can practice to the point where you can do it in less than a minute whenever you need it. By the way, the two given sides are most often given as a and b, and the included angle is then C. I just didn't draw the diagram that way, so my result uses different letters. . . . . . . maybe someday I'll redo the diagrams, but it's not a high priority for me. When or if I get around to it, the new final result becomes:
The Law of Cosines: c² = a² + b� − 2ab cos C 
More about the Law of Cosines can be found here.
Triangles  formulas for area and circumscribed and inscribed circles
Law of Sines: a/(sin A) = b/(sin B) = c/(sin C) = diameter of circumcircle
Trig Equivalences  cos(x) = 1  2sin²(x/2) = 2cos²(x/2)  1
Heron's formula for the area of a triangle, if all you know is the lengths of its sides.
The webmaster and author of this Math Help site is Graeme McRae.