And if then your derivative is wrong. The derivative is calculated using the chain rule.
Look, the fact is that currently you're quite out of your depth with the questions you are posting - the root cause of this appears to be a poor knowledge of the pre-requisite concepts and skills. As I have previously said, you are strongly advised to go back and learn those skills properly before attempting questions that depend on knowing them. I also strongly suggest that you get remedial help from your instructor.