Solution
= Solution
Assume the sequential condition, and let $A\subseteq Y$ be open. If $f^{-1}(A)$ were not open, some $a\in f^{-1}(A)$ would have no ball contained in $f^{-1}(A)$. For each $n$, choose
$$
x_n\notin f^{-1}(A),
\qquad
d_X(x_n,a)<\frac1n.
$$
Then $x_n\to a$, so $f(x_n)\to f(a)\in A$. Because $A$ is open, this forces $f(x_n)\in A$ eventually, a contradiction. Therefore $f^{-1}(A)$ is open. This proves the <sequential characterization of continuity in metric spaces>.