Use the given sine value to find the sine and cosine of A, using the x, y, and r definitions for the trigonometric functions.  Do the same using the given cosine value for angle B.  Remember to consider the quadrant each is in to get the correct sign.

Then substitute these values into the sum and difference identities for cosine.