$(x+y) \frac{d y}{d x}=1$
$(x+y) \frac{d y}{d x}=1$
$\Rightarrow \frac{d y}{d x}=\frac{1}{x+y}$
$\Rightarrow \frac{d x}{d y}=x+y$
$\Rightarrow \frac{d x}{d y}-x=y$
This is a linear differential equation of the form:
$\frac{d y}{d x}+p x=Q$ (where $p=-1$ and $Q=y$ )
Now, I.F $=e^{\int p d y}=e^{\int-d y}=e^{-y}$.
The general solution of the given differential equation is given by the relation,
$x($ I.F. $)=\int($ Q $\times$ I.F. $) d y+\mathrm{C}$
$\Rightarrow x e^{-y}=\int\left(y \cdot e^{-y}\right) d y+\mathrm{C}$
$\Rightarrow x e^{-y}=y \cdot \int e^{-y} d y-\int\left[\frac{d}{d y}(y) \int e^{-y} d y\right] d y+\mathrm{C}$
$\Rightarrow x e^{-y}=y\left(-e^{-y}\right)-\int\left(-e^{-y}\right) d y+\mathrm{C}$
$\Rightarrow x e^{-y}=-y e^{-y}+\int e^{-y} d y+\mathrm{C}$
$\Rightarrow x e^{-y}=-y e^{-y}-e^{-y}+\mathrm{C}$
$\Rightarrow x=-y-1+\mathrm{C} e^{y}$
$\Rightarrow x+y+1=\mathrm{Ce}^{y}$