Let $f:X\to Y$; let $X$ and $Y$ be metrizable with metrics $d_X$ and $d_Y$, respectively. Then continuity of $f$ is equivalent to the requirement that given $x\in X$ and given $\epsilon>0$, there exists $\delta>0$ such that $d_X(x,y)<\delta\implies d_Y(f(x),f(y))<\epsilon$.
I know the following result: A mapping $f$ of a metric space $X$ into a metric space $Y$ is continuous on $X$ if and only if $f^{-1}(V)$ is open $X$ for every open set in $Y$. This is theorem 4.8 of Baby Rudin. Using this result, theorem 21.1 is straightforward. Here’s a proof Exercise 1, Section 18 of Munkres’ Topology. In that post I proved notion of open set in metric space and topological space are same. Do I need to rewrite the proof or above argument is enough? Even if I rewrite the proof, idea in both(thm 4.8 & thm 21.1) proof are similar. In fact, in lemma 21.2, proof is almost identical to theorem 3.2(d) of Baby Rudin or https://math.stackexchange.com/a/4338980/861687.