How do I go about differentiating $p(x)=f(g(x))-x^2h(x)$?

I have to differentiate $$p(x)=f(g(x))-x^2h(x)$$ Which rules do I use? I'm not sure which rules to use and from where to start.


Solution 1:

$ \begin{align*} \frac{d}{dx} (f(g(x))-x^2h(x)) &= \frac{d}{dx} f(g(x)) - \frac{d}{dx} x^2h(x) & \text{Derivative is linear} \\ &= f'(g(x)) g'(x) - (2x h(x) + x^2h'(x)) & \text{Chain Rule and Product Rule} \\ \end{align*}$