I need to differentiate this function:

secx^2-tanx^2+cosx. these are my steps:

f'(x)= secx^2*tanx^2-secx^2-sinx and do not know how to finish this but i know the first two terms are suppose to cancel. the answer is suppose to be -sin x.

And also, How does 2 sinx cosx translate to sin2x?