Differential equation maybe tricky 
I had a problem with part 2. The solution didn't come up in the form y in terms of x. It came up with a relation between x and y on the contrary to part 1). Is it sufficient?
If no, then what is the solution of this differential equation
2) $(1+x)ydx=(y-1)xdy$  ?
 A: It is absolutely fine to leave it in an implicit form (Your solution is correct). Otherwise, you'd have to express it in terms of the Lambert W function to obtain an explicit solution.
Here is the definition given by Wikipedia:

Definition: In mathematics, the Lambert-W function, also called the omega function or product logarithm, is a set of functions, namely the branches of the inverse relation of the function $f(z) = ze^z$ where $e^z$ is the exponential function and $z \in \mathbb{C}$.

If you insist on an explicit solution, here is how to do this:

Let's start from the solution you obtained:
$$ce^{y-x}=xy$$
Let $u=-y$. Then:
$$ce^{-u-x}=-xu$$
Taking reciprocals on both sides:
$$\frac{e^{x+u}}{c}=-\frac{1}{xu}$$
One can rearrange this to obtain:
$$ue^u=-\frac{c}{xe^{x}}$$
Now, notice that we may now apply the definition of the Lambert W! Doing so gives:
$$u=W\left(-\frac{c}{xe^{x}}\right)$$
If we substitute back, and simplify arbitrary constants, we obtain the general solution:
$$\bbox[5px,border:2px solid #C0A000]{y(x)=-W\left(\frac{k}{xe^x}\right)}$$
