5. Problem: Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ that satisfy
$$
f(x+f(y))=2 x+2 f(y+1)
$$
for all real numbers $x$ and $y$.
Solution: Substitute $x=-f(y)$ into the given equation to get
$$
f(0)=-2 f(y)+2 f(y+1)
$$

We can then substitute $y=-1$ into (1) to get $f(0)=-2 f(-1)+2 f(0)$. Hence
$$
f(-1)=\frac{f(0)}{2} \text {. }
$$

Also we can substitute $y=-2$ into (1) to get $f(0)=-2 f(-2)+2 f(-1)$. Hence
$$
f(-1)=f(-2)+\frac{f(0)}{2} \text {. }
$$

Equations (2) and (3) tell us that $f(-2)=0$. Now substitute $y=-2$ into the original equation to get
$$
f(x+f(-2))=2 x+2 f(-1) \quad \Longrightarrow \quad f(x)=2 x+2 f(-1) .
$$

Therefore our function can be written in the form $f(x)=2 x+c$, where $c=2 f(-1)$ is a constant. We can substitute this into the original equation to get
$$
\begin{array}{rlrl} 
& & f(x+f(y)) & =2 x+2 f(y+1) \\
& \Longleftrightarrow & f(x+(2 y+c)) & =2 x+2(2(y+1)+c) \\
& \Longleftrightarrow & 2(x+(2 y+c))+c & =2 x+4 y+4+2 c \\
& \Longleftrightarrow & 2 x+4 y+3 c & =2 x+4 y+2 c+4 \\
& c & =4 .
\end{array}
$$

Therefore the function $f$ works if and only if $c=4$. Hence $f(x)=2 x+4$ (for all $x$ ) is the only solution.

Alternative Solution:
Substitute $x=z-f(0)$ and $y=0$ into the given equation to get
$$
\begin{aligned}
f((z-f(0))+f(0)) & =2(z-f(0))+2 f(1) \\
f(z) & =2 z+(2 f(1)-2 f(0)) .
\end{aligned}
$$

Hence $f(z)=2 z+c$ for any real number $z$, where $c=2 f(1)-2 f(0)$ is constant. Now
$$
f(1)-f(0)=(2 \cdot 1+c)-(2 \cdot 0+c)=2 .
$$

Hence $c=2 f(1)-2 f(0)=4$. Therefore $f(z)=2 z+4$ is the only possible function satisfying the given equation.

Now need to check that $f(z)=2 z+4$ does indeed satisfy the given equation
$$
\begin{aligned}
f(x+f(y))=f(x+2 y+4) & =2(x+2 y+4)+4=2 x+4 y+12 \\
& =2 x+2(2(y+1)+4)=2 x+2 f(y+1) .
\end{aligned}
$$

Hence $f(z)=2 z+4$ is the unique function $f$ satisfying the given equation.