how does 2cos^2 x - 2sin^2 x = 2cos2x

divide both sides by 2

and you end up with the definition of
cos 2x = cos^2 x - sin^2 x