This question involves multiple use of the chain rule. To make it manageable, split it into smaller sections. Start by putting . Then . By the chain rule,

Now you have to find . Do that in the same way, putting , where , and using the chain rule to find in terms of . Then use the chain rule once more to find . Finally, put everything together into a single expression and simplify it.

BTW this is a classic example of a case where using parentheses correctly makes things much easier to read: looks like a jumble, but is a lot clearer.