Do you know the chain rule? Just apply the chain rule repeatedly. The final answer should be
I won't do it by hand but you can look here for a complete answer (click "show steps"). Don't just copy the answer - make sure you understand the chain rule, it's important - you'll really have trouble later on if you don't master it now.
Your first question is similar.