Determine all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that

$$
(y+1) f(x)+f(x f(y)+f(x+y))=y
$$

for all $x, y \in \mathbb{R}$.
Substituting $x=0$ gives $(y+1) f(0)+f(f(y))=y$, so $f(f(y))=y \cdot(1-f(0))-f(0)$. If $f(0) \neq 1$, the right-hand side is a bijective function in $y$ and the left-hand side is also bijective. Thus, in this case, $f$ is bijective.
We will now show that in the case $f(0)=1$, $f$ is also bijective. So let $f(0)=1$. Then we get $f(f(y))=-1$ for all $y \in \mathbb{R}$. Substituting $y=0$ gives $f(x)+f(x+f(x))=0$, so $f(x+f(x))=-f(x)$. Next, substitute $x=f(z)$ and $y=z$ and replace $f(f(z))$ with -1:

$$
(z+1) \cdot-1+f(f(z) f(z)+f(z+f(z)))=z
$$

so, using that $f(z+f(z))=-f(z)$,

$$
f\left(f(z)^{2}-f(z)\right)=2 z+1
$$

This directly implies that $f$ is surjective. If there are $a$ and $b$ such that $f(a)=f(b)$, then substituting $z=a$ and then $z=b$ into the last equation gives the same result on the left, while on the right it first gives $2 a+1$ and then $2 b+1$. Thus, $a=b$, which means $f$ is injective. We see that $f$ is also bijective in this case.
We can now assume that $f$ is bijective, dropping the assumption $f(0)=1$. We know $f(f(y))=y \cdot(1-f(0))-f(0)$ and thus find with $y=-1$ that $f(f(-1))=-1$. Substituting $y=-1$ into the original equation gives

$$
f(x f(-1)+f(x-1))=-1=f(f(-1))
$$

Since $f$ is injective, it follows that $x f(-1)+f(x-1)=f(-1)$, so $f(x-1)=f(-1) \cdot(1-x)$. If we now take $x=z+1$, we see that $f(z)=-f(-1) z$ for all $z \in \mathbb{R}$. Thus, the function is of the form $f(x)=c x$ for $x \in \mathbb{R}$, where $c \in \mathbb{R}$ is a constant. We check this function. It holds that
$(y+1) f(x)+f(x f(y)+f(x+y))=(y+1) c x+c(x c y+c x+c y)=c x y+c x+c^{2} x y+c^{2} x+c^{2} y$.
This must be equal to $y$ for all $x, y \in \mathbb{R}$. With $y=0$ and $x=1$, we have $c+c^{2}=0$, so $c=0$ or $c=-1$. With $x=0$ and $y=1$, we have $c^{2}=1$, so $c=1$ or $c=-1$. We conclude that $c=-1$ and then we see that this function indeed satisfies the equation. Thus, the only solution is $f(x)=-x$ for $x \in \mathbb{R}$.