Find all the functions $f:\mathbb{R} \to \mathbb{R} $ which have the intermediate value property (IVP) and satisfy the relation $f(x+y) =f(x+f(y)) $, $\forall x, y \in \mathbb{R} $.
Since $f$ has IVP, we know that $f(\mathbb{R}) =I$, where $I$ is an interval. Taking $x=0$ in the initial relation we have $f(y) =f(f(y)) $, $\forall y \in \mathbb{R} $. Thus, $f(x) =x$, $\forall x\in I$.
Now here comes the part which I can't understand. The book goes on to prove that $I=\mathbb{R} $ by contradiction. They suppose that $I$ has an upper bound. Then $\exists a= \sup I$. Hence, $\exists x_n \to a$ so that $f(x_n) \to f(a) =a$.
Why does such a sequence exist? To me, it looks like they assumed that $f$ is continuous.
If you pick some $b_0 \in \mathbb{R} $ such that $b_0 \neq a$, then what you can do is by IVP find an element, say $b_1$ in $(b_0,a)$ such that $f(b_1)$ is arbitrarily close to $f(a)$, now you can also pick $b_0$ so that it is arbitrarily close to $a$, and so $b_1$ is arbitrarily close to $a$
Using this method you can see how you can find $(x_i)$ that satisfy the required properties.
The reason this isn't the same as continuous is because this doesn't necessarily hold for all sequences $(x_i)$, just that there exists some sequences for which this property holds.