Explanation:
the other answer is correct but missed a few steps in the explanation. so, just to be sure :
yes, we use the law of cosine (or I call it the general Pythagoras for non-right-angled triangles) :
c is the side opposite of the given angle. a, b are the other 2 sides.
c² = a² + b² - 2ab×cos(angle)
in our case
c² = 2² + 5² - 2×2×5×cos(60°) =
= 4 + 25 - 20×0.5 = 29 - 10 = 19
c (the third side) = sqrt(19) = 4.358898944... units
you see how this is connected to the regular Pythagoras in right-angled triangles ?
c² = a² + b² - 2ab×cos(90°)
cos(90°) = 0
and so all that is left is
c² = a² + b²