Okay, just use the chain rule. If you're not familiar with the chain rule, read this:
Chain rule - Wikipedia, the free encyclopedia
Anyway, here is the math:
1.
Now becomes
2. Differentiate:
What you did is that you used the product rule. Only use the product rule when you have something like this: Here, is a function of , and is a function of as well.
Your question is however: It means that is a function of , and is a function of