$$
(x+2)sin(y)+xcos(y)y’=0, \mu(x,y)=xe^x\\
$$
$$
M=(x+2)cos(y), N=xcos(y)\\
$$
$$
M_y=(x+2)cos(y), N_x=cos(y)\\
$$
$$
Since M_y \neq N_x, \text{so the equation is not exact}\\
$$
$$
\text{Now multiply}\mu=xe^x \text{both sides}\\
$$
$$
(x+2)xe^xsin(y)+x^2e^xcos(y)y’=0\\
$$
$$
M’=(x+2)xe^xsin(y), N’=x^2e^xcos(y)\\
$$
$$
M’_y=cos(y)(x^2e^x+2xe^x), N’_x=cos(y)(2xe^x+x^2e^x)\\
$$
$$
M’_y=N’_x\\
$$
$$
Then
$$
$$
\psi_x=M’=(x+2)xe^xsin(y)=(x^2e^x+2xe^x)sin(y)\\
$$
$$
\psi=x^2e^xsin(y)+h(y)\\
$$
$$
\psi=N’=cos(y)x^2e^x+h’(y)=cos(y)x^2e^x\\
$$
$$
So h’(y)=0\\
$$
$$
h( y) \text{is constant C}\\
$$
$$
So \psi=x^2e^xsin(y)+C\\
$$
$$
So x^2e^xsin(y)=C\\
$$