acosA=bsinB
a/b= sinB/cosA=sinA/sinB
sin²B=sinA*cosA
sinA+cosA+cos2B = sinA+cosA+(1-2sin²B)
= sinA+cosA+(1-2sinA*cosA)