You need to use the equations (see
http://en.wikipedia.org/wiki/Cosinus):
cos
2x + sin
2x = 1
cos(x+y) = cos(x)cos(y) - sin(x)sin(y)
sin(x+y) = sin(x)cos(y) + cos(x)sin(y)
With the equations you already have:
sin(x) + sin(y)= a
cos(x)+cos(y)= b
and a bit of work up, you should be able to solve your problem.
btw, I didn't notice there was a math forum as well. Nice