From the given equation #-2=x(x+y)^2-3xy# differentiate both sides with respect to x
#-2=x(x+y)^2-3xy#
#d/dx(-2)=d/dx[x(x+y)^2-3xy]#
#0=x*d/dx((x+y)^2)+(x+y)^2*d/dx(x)-3*[x*d/dx(y)+y*d/dx(x)]#
#0=x*2(x+y)^(2-1)*d/dx(x+y)+(x+y)^2*1-3[x*y'+y*1]#
#0=2x*(x+y)*(1+y')+(x+y)^2-3xy'-3y#
#0=(2x^2+2xy)*(1+y')+x^2+2xy+y^2-3xy'-3y#
#0=2x^2+2xy+2x^2y'+2xyy'+x^2+2xy+y^2-3xy'-3y#
transpose all the terms with #y'# to the left side of the equation
#3xy'-2xyy'-2x^2y'=2x^2+2xy+x^2+2xy+y^2-3y#
simplify
#3xy'-2xyy'-2x^2y'=3x^2+4xy-3y+y^2#
factor out the common monomial factor #y'#
#(3x-2xy-2x^2)y'=3x^2+4xy-3y+y^2#
Divide by the coefficient of #y'#
#((3x-2xy-2x^2)y')/(3x-2xy-2x^2)=(3x^2+4xy-3y+y^2)/(3x-2xy-2x^2)#
#(cancel(3x-2xy-2x^2)y')/cancel(3x-2xy-2x^2)=(3x^2+4xy-3y+y^2)/(3x-2xy-2x^2)#
#y'=(3x^2+4xy-3y+y^2)/(3x-2xy-2x^2)#
God bless....I hope the explanation is useful.