Continuity between metric d with respect to product topology

Question: Let $\left ( X,d \right )$ be a metric space with metric topology $T_{d}$. Prove that $d:X \times X \rightarrow \mathbb{R}$ is continuous with respect to the product topology on $X \times X$

$T_{d}$ is the topology induced by d so $T_{d}$ is the collection of arbitrary union of open balls in X.

Let $\left ( X,\tau_{1} \right )$ and $\left ( X,\tau_{2} \right )$ be topological spaces.

The product topology on $X \times X$ is the topology generated by the basis $B=\left \{ T_{1} \times T_{2} \mid T_{1} \in \tau_{1}, T_{2} \in \tau_{2} \right \}$

I would like to sincerely request for a useful hint to this question.

Thanks in advance.


Hint:

Fix $\langle a,b\rangle\in X\times X$ and let $d(a,b)\in U$ where $U$ is an open interval in $\mathbb R$.

It is enough to find open set $A,B\subseteq X$ with $a\in A$, $b\in B$ and $d(x,y)\in U$ for every $\langle x,y\rangle\in A\times B$. This because $A\times B$ is an open set in $X\times X$ that serves as neighborhood of $\langle a,b\rangle$ and satisfies $A\times B\subseteq d^{-1}(U)$.

Actually it proves that $d$ is continuous at the arbitrary $\langle a,b\rangle$ and this allows the conclusion that $d$ is continuous at any element of $X\times X$, hence $d$ is continuous.

For $A,B$ you can take open balls centered at $a$ and $b$ respectively. If both balls have $r>0$ as radius then it can be shown by means of the triangle inequality that $|d(x,y)-d(a,b)|\leq2r$. Taking $r$ small enough then gives $d(x,y)\in U$ as requested.