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

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

for all real numbers $x$ and $y$.
First, it is easily observed that for any real number $a$, the function $f: x \rightarrow x+a$ is a solution to the problem. Conversely, we will show that there are no other solutions.
In what follows, we consider a solution function $f$, we set $a=f(0)$, and we will denote by $\mathbf{E}(x, y)$ the equation

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

First, the equations $\mathbf{E}(x, 0)$ and $\mathbf{E}(0,2 x)$ show that $f(f(2 x))=f(x+a)+x$ and that $f(f(2 x))=f(2 x+a)$. We deduce that

$$
f(2 x+a)=f(f(2 x))=f(x+a)+x
$$

and, if we set $x=-a$, it follows that $f(-a)=f(0)-a=0$.
We then consider an arbitrary real number $x$, and we set $y=-f(-2 x)-a$ and $z=-x+f(y)$. Since $f(-a)=0$, the equation $\mathbf{E}(-x, y)$ shows that $f(z)-x=f(-a)=0$, that is, $f(z)=x$. The function $f$ is therefore surjective.
Let us prove that $f$ is also injective. Let $x$ and $y$ be two real numbers such that $f(x)=f(y)$, and let $d=y-x$. Let $t$ be an arbitrary real number, and let $z$ be a preimage of $t$ by $f$. The equations $\mathbf{E}(z / 2, x)$ and $\mathbf{E}(z / 2, y)$ show that

$$
f(t+x)=f(f(2 z / 2)+x)=f(z / 2+f(x))+z / 2=f(z / 2+f(y))+z / 2=f(t+y)
$$

If $d \neq 0$, this means that $f$ is $d$-periodic, which proves that $f(2 x)=f(2 x+2 d)=f(2 y)$ and that $f(x+a)=f(x+a+d)=f(y+a)$. But then the equation $\mathbf{E}(x, 0)$ indicates that

$$
x=f^{2}(2 x)-f(x+a)=f^{2}(2 y)-f(y+a)=y
$$

contradicting the fact that $d \neq 0$.
The function $f$ is therefore indeed injective. Since $\mathbf{E}(0, y)$ shows that $f(f(y))=f(y+a)$, as mentioned above, it follows that $f(y)=y+a$ for all real $y$, which concludes the proof.