Law of Cosines
∆ABC is not a right ∆ which is why one needs to subtract 2bccosA from b^2 + c^2.
Move point B and see what the paired calculations do.
The pythagorean theorem is a big part of this law, as is the fact that sin^2A + cos^2A = 1. Can you use the information in the yellow box and the other two pieces of information to derive the Law of Cosines?