I think you mean the differentiating the part w.r.t. .

According to the product rule of differentiation, . (first fix and differentiate w.r.t ; then fix and differentiate w.r.t )

You made mistake in this part.dy/dx (2xy² + x) = -2x² y-y

dy/dx = -2x² y-y / 2xy² + x

.

So . This is your slope. Equate this with and simplify to get the answer.