Let $(X, \mathcal{T})$, $(Y, \mathcal{U})$ be topological spaces and let $f: X \rightarrow Y$.
(a) Suppose $f$ is continuous and $\{x_n\}_{n=1}^{\infty}$ is a sequence in $X$ converging to a point $x$. Show that $\{f(x_n)\}_{n=1}^{\infty}$ converges to $f(x)$
(b) Suppose $(X, \mathcal{T})$ is first-countable, and suppose for each $x \in X$, and each sequence $\{x_n\}_{n=1}^{\infty}$ that converges to $x$, $\{f(x_n)\}_{n=1}^{\infty}$ converges to $f(x)$. Show that $f$ is continuous.
I have a slight idea on how to go about (a)
Consider the set containing $\{f(x_1), f(x_2), \dots, f(x_n), \dots, f(x)\}$. Under the map $f$, the pre-image of this set is an open set containing $\{x_1, x_2, \dots, x_n,\dots, x\}$. However since the set containing $\{x_1, x_2, \dots, x_n,\dots, x\}$ is open, its image must be a open set. Thus, the sequence $\{f(x_n)\}$ must converge to $f(x)$.
But no idea on (b) whatsoever.
Any help is appreciated.