Answer:
Given the reference to the chain rule, I assuming by "calculate", you mean "take the derivative of", in which case we have:
For the first function:
and for the second one:
4.5m questions
5.9m answers