Find $\cos(x+y)$  if $\sin(x)+\sin(y)= a$ and $\cos(x)+\cos(y)= b$ Find $\cos(x+y)$  if $\sin(x)+\sin(y)= a$ and $\cos(x)+\cos(y)= b$.

The following identities should help you:
$$
\tan \bigg(\frac{{x + y}}{2}\bigg) = \frac{{\sin x + \sin y}}{{\cos x + \cos y}}
$$
and
$$
\tan \bigg(\frac{{x + y}}{2}\bigg) =  \pm \sqrt {\frac{{1 - \cos (x + y)}}{{1 + \cos (x + y)}}} .
$$
