Prove that $f(\mathbb R) = \mathbb R$. Partially solved. 
Let $f:\mathbb R\to \mathbb R$ and $f(f(x)) = x + f(x)$, $x\in\mathbb R$
Prove that: a) $f$ is injective
b) $f(0) = 0$
c) $f(\mathbb R) = \mathbb R$

My solution:
a) Let $x_1, x_2 \in \mathbb R$ and $f(x_1) = f(x_2)$ then
$f(f(x_1)) = f(f(x_2))$
$x_1 + f(x_1) = x_2 + f(x_2)$
$x_1 = x_2$ therefore $f$ is injective.
b) Let $x=0$ then $f(f(x)) = x + f(x)$
$f(f(0)) = 0 + f(0)$
$f(f(0)) = f(0)$ but $f$ is injective therefore
$f(0) = 0$
c) Here is the point where I get stuck. How do I solve this?
I think I have to begin saying, let $y\in\mathbb R$ and prove that there is a $x\in\mathbb R$ for which $f(x) = y$.
 A: It works if you assume $f(x)$ is continuous. 
Claim: 
Suppose $f(x)$ is continuous and $f(f(x)) = x + f(x)$ for all $x \in \mathbb{R}$. Then $f(\mathbb{R})=\mathbb{R}$. 
Proof: 
We already know that $f(0)=0$ and $f(x)$ is injective.  It follows that $f(1)\neq 0$. 
-Case 1: Suppose $f(1)>0$.  Then (by the intermediate value theorem) we must have: 
\begin{align} 
&f(x) > 0 \: \: \mbox{ if $x >0$} \\
&f(x) < 0 \: \:   \mbox{ if $x<0$} 
\end{align} 
For all positive integers $n$ we have: 
\begin{align*}
&f(f(n)) = n + f(n) \geq n\\
&f(f(-n)) = -n + f(-n) \leq -n 
\end{align*}
and so $f$ takes arbitrarily large values and arbitrarily small values. By the intermediate value theorem, it must take all values in $\mathbb{R}$.
-Case 2: Suppose $f(1)<0$.  Then we must have: 
\begin{align} 
&f(x) < 0 \quad \mbox{ whenever $x >0$} \\
&f(x) >  0 \quad  \mbox{ whenever $x<0$} 
\end{align} 
Suppose there is a finite constant $-M$ such that $f(x) \in [-M,0]$ for all $x\geq 0$ (we reach a contradiction).  Then the infinite sequence $\{f(n)\}_{n=1}^{\infty}$ is in the compact interval $[-M,0]$, so the Bolzano-Wierstrass theorem ensures there is a subsequence $n_k$ such that $n_k\rightarrow\infty$ and $f(n_k) \rightarrow x^*$ for some $x^* \in [-M,0]$.  But for all $k$ we have: 
$$ f(f(n_k)) = n_k + f(n_k) $$
and taking a limit as $k\rightarrow \infty$ gives $f(x^*) = \infty + x^*$, a contradiction.  Thus, $f(x)$ takes arbitrarily small values over $x\geq 0$. 
A similar argument shows $f(x)$ takes arbitrarily large values over $x \leq 0$.  Hence, by continuity, $f(\mathbb{R}) = \mathbb{R}$. 
A: The solution (given by my teacher).
Let $y\in \mathbb R$ I'll prove that there is a $x \in \mathbb R$ for which $f(x) = y$
$f(x) = y$
$f(f(x)) = f(y)$
$x + f(x) = f(y)$
$x + y = f(y)$
$x = f(y) - y$
therefore $f(\mathbb R) = \mathbb R$
