Differentiate both sides with respect to #x#. This means that every time we differentiate a term containing #y#, we should end up with an instance of #dy/dx#.
#d/dx(xcos(y))=d/dx(sin(x+y))#
#cos(y)d/dx(x)+xd/dxcos(y)=cos(x+y)d/dx(x+y)#
#-xsin(y)dy/dx+cos(y)=(1+dy/dx)cos(x+y)#
Solve for #dy/dx:#
#-xsin(y)dy/dx+cos(y)=cos(x+y)+dy/dxcos(x+y)# (Multiply out on the right side)
#-xsin(y)dy/dx-dy/dxcos(x+y)=cos(x+y)-cos(y)# (Isolate all terms containing #dy/dx# on the left side, move all other terms to the right)
#dy/dx(-xsin(y)-cos(x+y))=cos(x+y)-cos(y)# (Factor out #dy/dx#)
#dy/dx=(cos(x+y)-cos(y))/(-xsin(y)-cos(x+y))#
(Divide both sides by #-xsin(y)-cos(x+y)#)