First Countable Spaces and Limit Preserving Functions I've being struggling with the following problema in Lee's book on topological manifolds.

Let $X$ and $Y$ be topological spaces. Let $f:X\to Y$ be a map such that $p_n \to p$ (convergent sequence) in $X$ implies $f(p_n) \to f(p)$ in $Y$. If $X$ is first countable, then $f$ is continuous.

I've found the following proof:
By hypotesis, the point $p \in X$ has a countable neighborhood basis $\{U_i\}_{i \in \mathbb{N}}$. Then it admits a nested neighborhood basis, that is, for $n<m$, $U_n \subseteq U_m $. Let $V \subseteq Y$ be a neighborhood of $f(p)$ and suppose that $\forall n \in \mathbb{N}$, $f(U_n) \nsubseteq V$. For each $n \in \mathbb{N}$, take $p_n \in U_n$ such that $f(p_n) \in V$. However, $f(p_n) \to f(p)$ and $f(p_n) \notin V$, which is a contradiction. Therefore, there is some $n \in \mathbb{N}$ for which $f(U_n) \subseteq V$, thus $f$ is continuous at $p$.
How does this imply the continuity of $f$?

We need the additional result:
Let $A \subseteq X$ of a first countable space, $x \in \overline{A}$ $\Longleftrightarrow$ $x$ is the limit of some sequence $x_n \in A$.

Let $B \subseteq Y$ be closed. Suppose that $f^{-1}(B)$ is not closed, then there is some $p \in \overline{f^{-1}(B)} \setminus f^{-1}(B)$ and by first countability there is a sequence $a_n \in f^{-1}(B)$ such that $a_n \to p$. We have that $f(a_n) \to f(p)$. However, $f(a_n)\in B$, since $B$ is closed, $f(p) \in f(B)$. This implies that $p \in f(B)$. Which is a contradiction, so $f^{-1}(B)$ is closed.
Since any $p \in A \subseteq X$ for $A$ closed is the limit of some sequence $(p_n)$ (since $X$ is first countable). It follows that $f^{-1}(A)$ is always closed, thus $f$ is continuous.

This seems more plausible than the one presented in the question. I still would like to know if the first proof is valid and if not, is there any change that would make it valid?
