There it is :
Suppose that
$(a)$ X and Y are metric spaces, $X$ is complete,
$(b)$ $f$ : $X$ $\to$ $Y$ is continuous
$(c)$ $X$ has a dense subset $X_0$ on which $f$ is an isometry, and
$(d)$ $f(X_0)$ is dense in $Y$,
Then $f$ is an isometry of $X$ onto $Y$.
There is the proof:
The fact that $f$ is an isometry on $X$ is an immediate consequence of the continuity of $f$, since $X_0$ is dense in $X$.
I don't understand why is the fact that $f$ is an isometry on $X$ immediate consequence of the continuity of $f$ ?
Any help would be appreciated.
Context: This question gives the proof of Lemma 4.16 in Rudin Real and Complex Analysis. This is used to prove the results in Theorem 4.17 which are the Bessel Inequality and the Riesz Fischer Theorem.
Suppose $d_X$ and $d_Y$ are the metrics of $X$ and $Y$, respectively.
$f$ is isometric on $X_0$. Then for any $a, b \in X_0$, $d_X(a,b) = d_Y(f(a), f(b))$.
Take any points $x_1, x_2 \in X$. Since $X_0$ is dense in $X$, we can create sequences $a_n$ and $b_n$ in $X_0$ such that, as $n \to \infty$, $a_n \to x_1$ and $b_n \to x_2$. And by continuity, as $n \to \infty$, $f(a_n) \to f(x_1)$ and $f(b_n) \to f(x_2)$.
Finally, we know that for every $n$, $d_X(a_n,b_n) = d_Y(f(a_n), f(b_n))$. Since any metric function for a metric space is also continuous, we have that $d_X(a_n, b_n) \to d_X(x_1, x_2)$ and $d_Y(f(a_n) f(b_n)) \to d_Y(f(x_1), f(x_2))$, so by taking the limit on both sides, we get $d_X(x_1, x_2) = d_Y(f(x_1), f(x_2))$.