Applying the trigonometric identities in sinθ+sinϕ=a and cosθ+cosϕ=b.
2sinθ+ϕ2cosθ−ϕ2=a (1)
And
2cosθ+ϕ2cosθ−ϕ2=b (2)
Square and add equation (1) and (2),
4sin2θ+ϕ2cos2θ−ϕ2+4cos2θ+ϕ2cos2θ−ϕ2=a2+b2
4cos2θ−ϕ2(sin2θ+ϕ2+cos2θ+ϕ2)=a2+b2
4cos2θ−ϕ2=a2+b2
sec2θ−ϕ2=4a2+b2
1+tan2θ−ϕ2=4a2+b2
tan2θ−ϕ2=4a2+b2−1
tan2θ−ϕ2=4−a2−b2a2+b2