if #y = f(g(x))#
then #y' = f'(g(x)) * g'(x)# by the chain rule, or the derivative of the outside function times the derivative of the inside function.
So the derivative of #cos(2x)# is #-sin(2x)# times the derivative of the inside, so it is #-2sin(2x)#.