Let $Y$ be compact and the graph of $f$ be closed, prove that $f : X \rightarrow Y$ is continuous.
This is exercise 6.1.3b from Set Theory and Metric Spaces by Irving Kaplansky. This is a problem about metric spaces, I am not very familiar with topological spaces.
My reasoning goes as follows
We want to show that if we have a sequence $x_n$ in $X$ that converges to $x$, then $f(x_n)$ converges to $f(x)$ in $Y$.
So, let $x_n$ be a convergent sequence in $X$. By applying $f$ to the sequence, we get a new sequence, $f(x_n)$ in $Y$. Now, $Y$ is compact and hence we can find a subsequence that converges, hence we have a sequence $f(x_{n_k})$ that is convergent. Now, consider this sequence of $x_{n_k}$ in $X$. Since the entire sequence $x_k$ converges, so must $x_{n_k}$ also converge to $x$. Hence, must our sequence $f(x_{n_k})$ converge to $f(x)$. This is where I am stuck. How can I show that the entire sequence of $f(x_k)$ converges to $f(x)$ and not just a subsequence?