Find $\cos2\theta+\cos2\phi$, given $\sin\theta + \sin\phi = a$ and $\cos\theta+\cos\phi = b$ 
If 
  $$\sin\theta + \sin\phi = a \quad\text{and}\quad \cos\theta+\cos\phi = b$$
then find the value of   $$\cos2\theta+\cos2\phi$$

My attempt:
Squaring both sides of the second given equation:
$$\cos^2\theta+ \cos^2\phi + 2\cos\theta\cos\phi= b^2$$
Multiplying by 2 and subtracting 2 from both sides we obtain, 
$$\cos2\theta+ \cos2\phi = 2b^2-2 - 4\cos\theta\cos\phi$$
How do I continue from here? 
PS: I also found the value of $\sin(\theta+\phi)= \dfrac{2ab}{a^2+b^2}$
Edit: I had also tried to use $\cos2\theta + \cos2\phi= \cos(\theta+\phi)\cos(\theta-\phi)$ but that didn't seem to be of much use
 A: $$\cos2\theta+\cos2\phi=2\cos(\theta+\phi)\cos(\theta-\phi),$$
$$a^2+b^2=2+2\cos(\theta-\phi)$$ and
$$b^2-a^2=\cos2\theta+\cos2\phi+2\cos(\theta+\phi).$$
Thus, $$\cos2\theta+\cos2\phi=2\cdot\frac{b^2-a^2-(\cos2\theta+\cos2\phi)}{2}\cdot\frac{a^2+b^2-2}{2},$$
which gives
$$\cos2\theta+\cos2\phi=\frac{(a^2+b^2-2)(b^2-a^2)}{a^2+b^2}.$$
A: HINT: use that $$\cos(2\theta)+\cos(2\phi)=\cos(\theta-\phi)\cos(\theta+\phi)$$
and $$\sin(\theta)+\sin(\phi)=2\cos\left(\frac{\theta-\phi}{2}\right)\sin\left(\frac{\theta+\phi}{2}\right)$$
and
$$\cos(\theta)+\cos(\phi)=2\cos\left(\frac{\theta-\phi}{2}\right)\cos\left(\frac{\theta+\phi}{2}\right)$$
so another idea, and this works:
use that
$$\sin(\theta)+\sin(\phi)=2\,{\frac {\tan \left( \theta/2 \right) }{1+ \left( \tan \left( \theta
/2 \right)  \right) ^{2}}}+2\,{\frac {\tan \left( \phi/2 \right) }{1+
 \left( \tan \left( \phi/2 \right)  \right) ^{2}}}
$$
and $$\cos(\theta)+\cos(\phi)={\frac {1- \left( \tan \left( \theta/2 \right)  \right) ^{2}}{1+
 \left( \tan \left( \theta/2 \right)  \right) ^{2}}}+{\frac {1-
 \left( \tan \left( \phi/2 \right)  \right) ^{2}}{1+ \left( \tan
 \left( \phi/2 \right)  \right) ^{2}}}
$$
and $$\cos(2\theta)+\cos(\phi)={\frac {1- \left( \tan \left( \theta \right)  \right) ^{2}}{1+ \left( 
\tan \left( \theta \right)  \right) ^{2}}}+{\frac {1- \left( \tan
 \left( \phi \right)  \right) ^{2}}{1+ \left( \tan \left( \phi
 \right)  \right) ^{2}}}
$$
now convert $$\tan(x)$$ into $\tan(x/2)$ and solve the equations above for $$\tan(\phi/2)$$ respective $$\tan(\theta/2)$$
A: Let $s= \cos^2(\theta)+\cos^2(\phi)$, we want $2(s-1)$. Square the first equation and use Pythagorus
\begin{eqnarray*}
a^2+s-2 =2 \sin( \theta) \sin (\phi) \\
(a^2+s-2)^2 = 4(1- \cos^2( \theta))(1- \cos^2 (\phi)) \\
(a^2-2)^2-4+2a^2 s+s^2 =4 \cos^2( \theta) \cos^2 (\phi)
\end{eqnarray*}
From the second equation
\begin{eqnarray*}
(b^2-s)^2=4 \cos^2( \theta) \cos^2 (\phi)
\end{eqnarray*}
Put these together & we have
\begin{eqnarray*}
s= \frac{b^4+4a^2-a^4}{2(a^2+b^2)} \\
\cos(2 \theta)+ \cos( 2\phi)=(b^2-a^2) \left(1- \frac{2}{a^2+b^2} \right).
\end{eqnarray*}
A: Using Prosthaphaeresis Formula,
$$\cos2\theta+\cos2\phi=2\cos(\theta+\phi)\cos(\theta-\phi),$$
Now $$a^2+b^2=2+2\cos(\theta-\phi)\implies\cos(\theta-\phi)=?$$
Again, using  Prosthaphaeresis formula,  $$a=\sin\theta+\sin\phi=2\sin\dfrac{\theta+\phi}2\cos\dfrac{\theta-\phi}2$$
and $$b=\cdots=2\cos\dfrac{\theta+\phi}2\cos\dfrac{\theta-\phi}2$$
$$\implies\dfrac ab=\tan\dfrac{\theta+\phi}2$$
Now use $$\cos2A=\dfrac{1-\tan^2A}{1+\tan^2A}$$
