The chain rule is one of the most important concepts in AP Calculus AB. When you have nested functions, you must take the derivative of each layer independently and multiply them together.
Another color coded example:
For more examples see: http://17calculus.com/derivatives/chain-rule/