Well, do you know identities for cos(a+b) and cos(a-b) ?
So what will cos(a-b) be ?
For the second one, use twice the formula for cos(a+b) :
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.