the first part is just the chain rule: $(f(g(x))' = f'(g(x)) \cdot g'(x)$, the second part is just a regular derivative