We have $\displaystyle\sin\theta\cos\phi=\sin\phi(\cos\phi-\cos\theta)$
Squaring we get $\displaystyle\sin^2\theta\cos^2\phi=\sin^2\phi(\cos\phi-\cos\theta)^2$
$\displaystyle\implies \sin^2\phi(\cos^2\phi+\cos^2\theta-2\cos\phi\cos\theta)=(1-\cos^2\theta)\cos^2\phi$
$\displaystyle\iff \cos^2\theta-2\cos\phi\sin^2\phi\cos\theta+\sin^2\phi\cos^2\phi-\cos^2\phi=0$
whose roots are $\displaystyle\cos a,\cos b\implies \cos a+\cos b=2\cos\phi\sin^2\phi$
Similarly starting with, $\displaystyle\cos\theta\sin\phi=\cos\phi(\sin\phi-\sin\theta),$
we shall find $\displaystyle\sin a+\sin b=2\cos^2\phi\sin\phi$