Add the equations together.
If A = B:
Convert into terms of only cosA and you should get your answer
Use your result from the first question to split your products in to sums. It'll be easier to integrate.
Make the subs:
You'll need your half-angle identity from your first question to do it after you simplify.