the differential of cos(x) is -sin(x). the differential of cos(2x) is -2sin(2x). you can think of it as differentiating what is in the bracket and putting that in front of the -sin(2x). when differentiating the part in the bracket will always remain the same. the differentials of sin(x) is cos(x). these are standard differentials that should be remembered. therefore the solution is -2sin(2x) + 3cos(3x).