Ok..1.sin2(x) + cos2(x) = 1=>sin2(x)=1+cos2(x)....but you have - in front of sin so you can see why -1+cos2(x)
2.sin(2x) = 2 sin x cos x
from 1 and 2 =>-sin2(x) + cos2(x)+2 sin x cos x=-1+cos2(x)+sin(2x)
It's also probably worth noting that $\displaystyle \cos^2(x) - \sin^2(x) = \cos(2x)$ is a standard double angle formula (because I just know that the next question asked by the OP will be how to find y ....)