They're just after some straightforward algebra starting from the Law of Cosine. We don't have to evaluate any trig functions or anything like that.
We move the c² and the cosine term to their other sides,
That's it for the algebra.
a,b and c are the side lengths opposite A,B and C respectively. So a=4, b=5, c=2.
We substitute:
Answer: A. 37