Start with the given equation and differentiate with respect to x both sides of the equation

#2=y*sin x-x*cos y#

#d/dx(2)=d/dx(y*sin x-x*cos y)#

#0=y*d/dx(sin x)+sin x*d/dx(y)-[x*d/dx(cos y)+cos y*d/dx(x)]#

#0=y*cos x+sin x*y'-[x(-sin y*y')+cos y*1]#

#0=y*cos x+sin x*y'+x*sin y*y'-cos y#

transpose terms without the #y'#

#cos y-y*cos x=sin x*y'+x*sin y*y'#

by symmetric property of equality we have

#sin x*y'+x*sin y*y'=cos y-y*cos x#

factor out #y'#

#(sin x+x*sin y)*y'=cos y-y*cos x#

Divide both sides of the equation by #(sin x+x*sin y)#

#((sin x+x*sin y)*y')/(sin x+x*sin y)=(cos y-y*cos x)/(sin x+x*sin y)#

#(cancel(sin x+x*sin y)*y')/cancel(sin x+x*sin y)=(cos y-y*cos x)/(sin x+x*sin y)#

#y'=(cos y-y*cos x)/(sin x+x*sin y)#

God bless....I hope the explanation is useful.