Prove $A=\{ x \in \mathbb R \mid \exists \{ x_n \}_{n=1}^\infty \subset (0,1] \ s.t. \ \lim x_n=0, \lim f(x_n)=x \}$ is closed. Let $f : (0, 1] \to \mathbb R$ continuous.
Define $A$ as $$A=\{ x \in \mathbb R \mid \exists \{ x_n \}_{n=1}^\infty \subset (0,1] \mathrm{\ s.t.}  \lim_{n\to \infty} x_n=0, \lim_{n\to \infty}f(x_n)=x \}.$$
Then, prove that $A$ is closed.
It's sufficient to show $A \supset \overline A.$
Let $a\in \overline A$.
Since $\overline A=\{ a \in \mathbb R \mid \exists \{ a_n \}_{n=1}^\infty \subset A \ s.t.\ \lim_{n\to \infty}a_n=a \ \mathrm{in}\ \mathbb R \},$ there exists $\{a_n \}_{n=1}^\infty \subset A$ s.t. $\lim_{n\to \infty} a_n=a$ in $\mathbb R.$
Then, for all $n \in \mathbb N,$ $a_n \in A$ i.e., there exists $\{ b_m^{(n)} \}_{m=1}^\infty\subset (0,1]$ s.t. $\lim_{m\to \infty}b_m^{(n)}=0, \lim_{m\to \infty} f(b_m^{(n)})=a_n.$
I have to find $\{x_k\}_{k=1}^\infty \subset (0,1]$ that confirms $a\in A.$
$\{ b_m^{(n)} \}_{m=1}^\infty\subset (0,1]$ seems to be useful but this is defined for each $n$, so I cannot let simply $x_k=b_k^{(n)}$.
How should I define  $\{ x_k \}_{k=1}^\infty $ ?
 A: You are almost there. Your actual sequence should consist of the $b_m^{(n)}$ values, you just have to pick them correctly. What you can do is this. First, pick some $\epsilon$.

*

*Look at the sequence $\{b_m^{(1)}\}_{m=1}^\infty$. You know that its limit is $0$, and the limit of $f(b_m^{(1)})$ is $a$. So, you can choose some $m_1$ such that $b_{m_1}^{(1)} < \frac12$ and $|f(b_{m_1}^{(1)}) - a| < \frac12$

*Look at the sequence $\{b_m^{(2)}\}_{m=1}^\infty$. You know that its limit is $0$, and the limit of $f(b_m^{(2)})$ is $a$. So, you can choose some $m_2$ such that $b_{m_2}^{(2)} < \frac14$ and $|f(b_{m_2}^{(2)}) - a| < \frac14$
can you continue from here?
A: Perhaps some context would be interesting for those browsing through here.
Take an arbitrary function $f:\mathbb R\to \mathbb R$.  [Yes, forget about continuity which was a silly assumption in the stated problem.]
Define $C^+(f,x)$ to be the set of all numbers $-\infty\leq r\leq +\infty$ for which there is at least one strictly decreasing sequence $\{x_n\}$ converging to $x$ with $f(x_n)\to r$.  Similarly  $C^-(f,x)$ to be the set of all numbers $-\infty\leq r\leq +\infty$ for which there is at least one strictly increasing sequence $\{x_n\}$ converging to $x$ with $f(x_n)\to r$.
These are called (often) right and left cluster sets for $f$ at the point $x$ although some might call them limit points.
In any case the sets $C^+(f,x)$  and $C^-(f,x)$  are always closed.
If you must add in the condition that $f$ is continuous except at $x$ then at least add in that, in that case, these sets are closed intervals, not merely closed.
For some entertaining history (I hope it is entertaining) I quote from reference [1] below about the research of the Young family in the UK during the early decades of the 20th century.

In [W 1908i] is given the following theorem: if $f$ is an arbitrary
function of a real variable then for all values of $x$, excepting
perhaps for a countable set, $$\limsup_{h\to 0+} f(x + h) =
  \limsup_{h\to 0+} f(x - h) \text{  and  } \liminf_{h\to 0+} f(x + h) =
  \liminf_{h\to 0+} f(x - h).$$   Because the theorem was announced at
the meeting of the British Association at Leicester in 1907 they used
to refer to this as the "Leicester theorem." The next year at the Rome
congress of 1908 this was improved to the statement that again for all
values of $x$, excepting perhaps for a countable set all of the left and
right limit numbers are identical. Stated in more modern language this
theorem (naturally called the "Rome theorem") asserts that at all but
countably many points the right and left cluster sets of an arbitrary
function $f$ are identical: for an arbitrary real function $f$,
$$ C^-(f,x) = C^+(f,x)$$ except at countably many points $x$.
They went on to show in [W 1907ii] that the value $f(x)$ lies in the
cluster sets, excepting again for countably many points, i.e. $f(x)\in
  C^+(f,x) = C^-(f,x)$. Similar themes, including analogous results for
functions of several variables, reappear in the later papers [W
1910iii], [WG 1918i] and [W 1928iv] which is one of their last papers.
(The exceptional set in the several variable case will no longer be
countable.) They had no small measure of (justified) pride in these
theorems; for one thing they are genuinely interesting theorems that
make an assertion true for a completely arbitrary function and they
are perhaps the first such assertions. This also started a research
program of searching for "asymmetry" results, i.e. results about the
distinction between left and right as regards limits and derivatives.
It is this line of research that culminated in the Denjoy-Young-Saks
theorem and that has since generated dozens of related inquiries.

REFERENCES:
[1] http://classicalrealanalysis.info/documents/BT-YoungsArticle.pdf
[2] See also Dave Renfro's answer to a similar problem posted in this forum:
Cluster point of a function at a point
