Let's take the derivative of each term one by 1
x^2
Apply the power rule for derivatives.
2x^(2-1) = 2x
You get 2x.
2x
Apply the power rule (x^1) and the constant multiple rule.
2 * x^(1-1) = 2 * x^0 = 2
You get 2.
-4
The derivative of a constant is 0.
Put that together and you get 2x + 2
Have an awesome day! :)