I'm not arriving at the correct answer, kindly point out my mistake(s).
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:
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