Given that you have a fraction in the question, you are clearly asked to use the quotient rule. In order to do this, you should label the numerator u, and the denominator v, like this: u = 2x v=cos(x). Now, you should differentiate (multiply by the power and subtract 1 from the power) both of these to find u' and v'. For u, which is 2x^1, this is simply a question of removing the x, and so: u' = 2. For v, it is a matter of remembering the derivatives of trigonometric functions. In this case, the differential of cosx, v', is -sinx. And so we have:
u = 2x v = cos(x) u' = 2 v'= -sinx
Now sub all of these into the quotient rule : (vu' - uv')/v^2
This gives us (2cos(x) + 2xsin(x))/cos^2(x)