Find all functions $f: \mathbb{Q} \rightarrow \mathbb{Q}$ satisfying $f(0)=0$ and

$$
\forall x, y \in \mathbb{Q}, \quad f(f(x)+f(y))=x+y
$$

The following problem serves to introduce a classic and very useful trick...
If we take $y=0$, we immediately obtain

$$
f(f(x))=x
$$

If we take the initial equation again, we can apply $f$ to both sides, and we have

$$
f(f(f(x)+f(y)))=f(x+y) \Longleftrightarrow f(x)+f(y)=f(x+y)
$$

So $f$ satisfies Cauchy's equation, and since $f: \mathbb{Q} \rightarrow \mathbb{Q}$, the only potential solutions are linear functions.

Be careful! This is where one must not make the mistake of concluding that all linear functions are solutions... Indeed, suppose that $f(x)=a x$, then in the initial equation,

$$
a(a x+a y)=x+y \Longleftrightarrow a^{2}(x+y)=x+y
$$

Thus $a^{2}=1 \Longleftrightarrow a= \pm 1$. Finally, the only solutions are $f(x)=x$ and $f(x)=-x$