Here's a problem from a real analysis textbook that I'm using:
Let $f\colon J \to \mathbb{R}$ be continuous. Let $\alpha \in \text{Im}(f)$. Let $S:=f^{-1} (\alpha)$. Show that $(x_n)$ is a sequence in $S$ converging to an element $a\in J$, then $a\in S$.
There are few things that are troubling me. Shouldn't $f$ be a bijection since we are making use of its inverse? Also, irregardless of the fact that a sequence converges to some $a \in J$, does it not hold that $J=S$?
If I'm misinterpretating the question, please do let me know and I'll finish up the problem.
Here $f^{-1}(\alpha)$ means the preimage of $\alpha$ under $f$. This makes sense even if $f$ is not a bijection. If $f$ is a bijection, then $f^{-1}(\alpha)$ can both mean the element $x$ with $f(x)=\alpha$ and the set $\lbrace x \rbrace$.
Regarding the question, a hint is that if $f$ is continuous, then the preimage of a closed set (like a singleton) is closed. How do you characterize closedness in terms of sequences?