The answer you got is almost right. It should be:
I'm going to name this equation as follows
I'm using f instead of the traditional y so the equation makes sense
The chain rule states
In your case where
So using the chain rule in this case you get:
Substituting y back in it becomes:
You had the right idea and almost got it correct. The chain rule can be easy to mess up especially when y is involved.