For this question why

Question

For this question, why

is that I am not taking the derivative of each individual? When I first did it I got the answer in red which is wrong. Apparently you are supposed to do the chain rule. My question is when do you know to apply the derivative for each problem versus this?

Math