Prove that is $f:X\rightarrow Y$ is continuous and $\lim_{n\rightarrow\infty}x_n=x$ then $\lim_{n\rightarrow\infty}f(x_n)=f(x)$. I am preparing for a midterm and came across this question from a past exam. I am hoping someone could help point me in the correct direction with the second part.
Let $X$ and $Y$ be topological spaces.
(i) Define Continuous, as in $f:X\rightarrow Y$ is continuous.
(ii) In a topological space $X$, $\lim_{n\rightarrow\infty}x_n=x$ means that every neighbourhood of $x$ contains all but finitely many points $x_1,x_2,\ldots$ Prove that is $f:X\rightarrow Y$ is continuous and $\lim_{n\rightarrow\infty}x_n=x$ then $\lim_{n\rightarrow\infty}f(x_n)=f(x)$.
Attempt:
(i) 
For topological spaces $X$ and $Y$, the function $f:X \rightarrow Y$ is continuous at the point $x\in X$ if every neighbourhood, $N$, of $f(x)$ contains the image of some neighbourhood of $x$.
Can anyone help me better understand the phrase "every neighbourhood, $N$, of $f(x)$ contains the image of some neighbourhood of $x$"
(ii)
Based on the above definition $f:X \rightarrow Y$ is continuous means that at a point $x\in X$ every neighbourhood of $f(x)$ contains the image of some neighbourhood of $x$, but I am not sure how I connect this with the limit.
 A: $(i)$ Continuity at point $x$ can be defined as $$(\forall N\in\mathcal N_{f(x)})\,(\exists M\in\mathcal N_x)\ f(M)\subseteq N$$ where $\mathcal N$ denotes neighbourhood system. This is just restatement of your sentence and in the case of real functions reads this: $$(\forall\varepsilon > 0)\,(\exists \delta >0)\ f(B(x,\delta))\subseteq B(f(x),\varepsilon)$$ or more familiar version of the same: $$(\forall\varepsilon > 0)\,(\exists \delta >0)\ |x-y| < \delta\implies |f(x) - f(y)| < \varepsilon$$
$(ii)$ Let $N$ be a neighbourhood of $f(x)$ and take $M$ a neighbourhood of $x$ such that $f(M)\subseteq N$. Since $x_n\to x$, $M$ contains all but finitely many of $x_n$'s, and thus $N\supseteq f(M)$ contains all but finitely many of $f(x_n)$'s. Since $N$ was arbitrary, any neighbourhood of $f(x)$ contains all but finitely many $f(x_n)$'s, and thus $f(x_n)\to f(x)$.
A: Suppose $f: X \to Y$ is continuous and $\lim\limits_{n \to \infty} x_n = x$. Let $V$ be an open set about $f(x)$. Then we know $U=f^{-1}(V)$ is an open set in $X$ that contains $x$. We also know that there exists open set $M$ of $x$ such that $x_n \in M$ for large enough $n$. If we let $F = U \cap M$ then $F$ is open and contains infinitely many $x_j$. It follows that $f(F) \subset V$ and since $V$ was an arbitrary open set about $f(x)$, we are done i.e $f(x_n) \to f(x)$. 
