Here is Prob. 6, Sec. 5.6, in the book Introduction To Real Analysis by Robert G. Bartle & Donald R. Sherbert, 4th edition:
Let $I \subset \mathbb{R}$ be an interval and let $f \colon I \to \mathbb{R}$ be increasing on $I$. Suppose that $c \in I$ is not an endpoint of $I$. Show that $f$ is continuous at $c$ if and only if there exists a sequence $\left( x_n \right)$ in $I$ such that $x_n < c$ for $n = 1, 3, 5, \ldots$; $x_n > c$ for $n = 2, 4, 6, \ldots$; and such that $c = \lim \left( x_n \right)$ and $f(c) = \lim \left( f \left( x_n \right) \right)$.
My Attempt:
As $f$ is increasing on $I$ and as $c$ is an interior point of $I$, so both the one-sided limits exist at $c$, and we have $$ \lim_{x \to c-} f = \sup \big\{ \ f(x) \ \colon \ x \in I, x < c \ \big\} \tag{1} $$ and $$ \lim_{x \to c+} f = \inf \big\{ \ f(x) \ \colon \ x \in I, x > c \ \big\}, \tag{2} $$ by virtue of Theorem 5.6.1 in Bartle & Sherbert.
Moreover, as $f(x) \leq f(c)$ for all $x \in I$ such that $x < c$ and as $f(x) \geq f(c)$ for all $x \in I$ such that $x > c$, so we see that the real number $f(c)$ is both an upper bound of the set in (1) above and a lower bound of the set in (2); therefore from (1) and (2) we can conclude that $$ \lim_{x \to c-} f \leq f(c) \leq \lim_{x \to c+} f. \tag{3} $$
As $c$ is an interior point of $I$, so there exists a positive real number $\eta$ such that $x \in I$ whenever $x$ is a real number and $\lvert x-c \rvert < \eta$, that is, such that the set $$ \big\{ \ x \in \mathbb{R} \ \colon \ \lvert x-c \rvert < \eta \ \big\} \subset I, \tag{4} $$ or $$ \big( \ c - \eta, c + \eta \ \big) \subset I. \tag{4} $$ Now we can find a natural number $N$ such that $$ 0 < \frac{1}{N} < \eta. \tag{5} $$
I've included this last paragraph in the hope of being able eventually to complete the direct part of my argument, which follows.
Suppose that $f$ is continuous at $c$. Then $$ \lim_{x \to c- } f = f(c) = \lim_{x \to c+} f. \tag{6} $$
For each $n \in \mathbb{N}$, as $$ f(c) - \frac{1}{n} < f(c) < f(c) + \frac{1}{n}, $$ so from (1), (2), and (6) above we can conclude that there exist points $a_n, b_n \in I$ such that $$ a_n < c \qquad \mbox{ and } \qquad b_n > c $$ and such that $$ f(c) - \frac{1}{n} < f \left( a_n \right) \leq f(c) \qquad \mbox{ and } \qquad f(c) \leq f \left( b_n \right) < f(c) + \frac{1}{n}. $$ Therefore the sequences $\left( f \left( a_n \right) \right)$ and $\left( f \left( b_n \right) \right)$ both converge to the limit $f(c)$.
How to show that $\left( a_n \right)$ and $\left( b_n \right)$ both converge to $c$? Once this has been shown, then we can put $$ x_n \colon= \begin{cases} a_n \ & \ \mbox{ if } n \mbox{ is } odd, \\ b_n \ & \ \mbox{ if } n \mbox{ is } even. \end{cases} $$
Or, is there some other way to obtain our sequence $\left( x_n \right)$?
Conversely, suppose that there exists a sequence $\left( x_n \right)$ in $I$ such that $x_n < c$ for $n = 1, 3, 5, \ldots$; $x_n > c$ for $n = 2, 4, 6, \ldots$; and such that $$ \lim \left( x_n \right) = c \ \mbox{ and } \ \lim \left( f\left( x_n \right) \right) = f(c). $$ We need to show that (6) above holds.
Note that (3) holds. Suppose that $$f(c) > \lim_{x \to c-} f. \tag{A} $$ Then we also have the inequalities $$f(c) > \frac{ f(c) + \lim_{x \to c-} f }{2} > \lim_{x \to c-} f. $$ Now us put $$ \varepsilon \colon= \frac{ f(c) - \lim_{x \to c-} f }{2}. $$ This $\varepsilon > 0$ and $$ f(c) - \varepsilon = f(c) - \frac{ f(c) - \lim_{x \to c-} f }{2} = \frac{ f(c) + \lim_{x \to c-} f }{2} > \lim_{x \to c- } f. $$ That is, $$ f(c) - \varepsilon > \lim_{x \to c- } f. \tag{7} $$ As the sequence $\left( f\left(x_n \right) \right)$ converges to $f(c)$, so for this $\varepsilon$, there exists a natural number $K = K(\varepsilon)$ such that $$ \left\lvert f\left( x_n \right) - f(c) \right\rvert < \varepsilon $$ or $$ f(c) - \varepsilon < f \left( x_n \right) < f(c) + \varepsilon $$ for all natural numbers $n > K$. Thus from (7) we can conclude that $$ f \left( x_n \right) > \lim_{x \to c-} f $$ for all natural numbers $n > K$. Therefore as $2K+1 > K$, so we must have $$ f\left( x_{2K+1} \right) > \lim_{x \to c-} f. $$ But by our hypothesis about the sequence $\left(x_n \right)$, we see that as $x_{2K+1} \in I$ and as $x_{2K+1} < c$, so we see from (1) above that $$ f \left( x_{2K+1} \right) \leq \lim_{x \to c-} f. $$ Thus we have a contradiction and so (A) above cannot hold.
Is this part of my proof correct?
Now let us assume that $$ f(c) < \lim_{x \to c+} f. \tag{B}$$ Then for $$ \varepsilon \colon= \frac{ \lim_{x \to c+} f \ - f(c) }{2} $$ we can find a natural number $K = K(\varepsilon)$ such that for any natural number $n > K$, we have $$ \left\lvert f \left( x_n \right) - f(c) \right\rvert < \varepsilon $$ or $$ f(c) - \varepsilon < f \left( x_n \right) < f(c) + \varepsilon = \frac{ f(c) + \lim_{x \to c+} f }{2} < \lim_{x \to c+} f. $$ In particular, we have $$ f \left( x_{2K} \right) < \lim_{x \to c+} f. $$ But as $x_{2K} \in I$ and $x_{2K} > c$ so we must have $$ f \left( x_{2K} \right) \geq \lim_{x \to c+} f. $$ Refer to (2) above. Thus we arrive at a contradiction and thus conclude that (B) cannot hold either.
Is this portion of my proof correct?
Now as (3) above always holds and as neither of (A) and (B) can hold, so we conclude that (6) holds, and therefore $f$ is continuous at $c$.
Is what I've done so far correct and clear enough? If so, then how to supply the missing part so as to complete the proof?
This might be simpler: let $\{x_n\}$ be the required sequence satisfying $x_n \to c$ and $f(x_n) \to f(c)$. Choose $\epsilon > 0$ and let $N$ be sufficiently large so that $n \ge N$ implies $|f(x_n) - f(c)| < \epsilon$. This can be restated as $$ f(c) - \epsilon < f(x_n) < f(c) + \epsilon.$$
Since $x_{2N+1} < c < x_{2N+2}$ we may select $\delta > 0$ satisfying $$ x_{2N+1} < c-\delta < c < c+\delta < x_{2N+2}.$$
Suppose $|x-c| < \delta$. Then $x_{2N+1} < x < x_{2N+2}$, and since $f$ is increasing you have $f(x_{2N+1}) < f(x) < f(x_{2N+2}).$ Since $2N+1 \ge N$ and $2N+2 \ge N$, this gives $$f(c) - \epsilon < f(x_{2N+1}) < f(x) < f(x_{2N+2}) < f(c) + \epsilon.$$ That is, $|x-c| < \delta$ implies $|f(x) - f(c)| < \epsilon$.