How to to a better approach for this :? If, $$x\cos A+y\sin A=k=x\cos B+y\sin B$$  Then find $(\cos A)(\cos B)$,  $(\sin A)(\sin B)$ and $\cos A+\cos B$ 
and express them in terms of $x,y,k$   I found a solution but it included a really huge steps, Hope you can help me find an easy approach .
My "Bad Looking solution",
$x^2+y^2=(x^2+y^2)(sin^2A+cos^2A)=x^2sin^2A+y^2cos^2A-2xysinAcosA+x^2cos^2A+y^2sin^2A+2xysinAcosA$
Now it is easy to see that 
$x^2+y^2=(xsinA-ycosA)^2+k^2$
So, after many steps after finding the value of $sinA$ , $cosA$ from the simultaneous that we get, I got the ans, but it was really a very long way. :(

We have $\displaystyle x\cos A=k-y\sin A$
Squaring we get, $\displaystyle x^2\cos^2A=(k-y\sin A)^2\iff (x^2+y^2)\sin^2A-2ky\sin A+k^2-x^2=0$
We shall reach at the same Quadratic Equation if we start with 
$\displaystyle x\cos B+y\sin B=k\iff x\cos B=k-y\sin B$
So, $\displaystyle\sin A,\sin B$ are the roots of $\displaystyle(x^2+y^2)\sin^2C-2ky\sin C+k^2-x^2=0$
Now apply Vieta's formula
Can you follow the same for cosine
$\displaystyle x\cos B+y\sin B=k\iff y\sin B=k-x\cos B$ and sqaure
