We have,
xcosα+ysinα=a.......(1)
xcosα−ysinα=b......(2)
On squaring and adding both equation
(xcosα+ysinα)2+(xsinα−ycosα)2=a2+b2
⇒x2cos2α+y2sin2α+2xysinαcosα+x2sin2α+y2cos2α−2xysinαcosα=a2+b2
⇒x2cos2α+x2sin2α+y2sin2α+y2cos2α=a2+b2
⇒x2(cos2α+sin2α)+y2(cos2α+sin2α)=a2+b2
⇒x2+y2=a2+b2
Hence, this is the answer.