How to show $f$ is continuous at $x$ IFF for any sequence ${x_n}$ in $X$ converging to $x$ the sequence $f(x_n)$ converges in $Y$ to $f(x)$

Suppose $f$ preserves limits of sequences but is not continuous at $x$. Then there exists an $\varepsilon>0$ such that for all $\delta>0$ there exists a point $y$ with $d_X(x,y)<\delta$ but $d_Y(f(x),f(y))>\varepsilon$. Then we construct a sequence of $\delta_i$ tending to 0, and select $y_i$ so that where $d_X(x,y_i)<\delta_i$. Then this sequence tends to $x$ but its image does not tend to $f(x)$.

Conversely, suppose $f$ is continuous, and let $x_n$ tend to $x$. Fix any $\varepsilon>0$. Since $f$ is continuous, there exists a ball of radius $\delta$ such that $d_X(x,y)<\delta$ implies $d_Y(f(x),f(y))<\varepsilon$. Then since the $x_n$ are eventually all within the $\delta$-ball centered at $x$, their images are eventually all in the $\epsilon$-ball centered at $f(x)$. Thus $f(x_n)$ converges to $f(x)$.