You have the following inclusions:
$$\{ \textrm{inner product vector spaces} \} \subsetneq \{ \textrm{normed vector spaces} \} \subsetneq \{ \textrm{metric spaces} \} \subsetneq \{ \textrm{topological spaces} \}.$$
Going from the left to the right in the above chain of inclusions, each "category of spaces" carries less structure. In inner product spaces, you can use the inner product to talk about both the length and the angle of vectors (because the inner product induces a norm). In a normed vector space, you can only talk about the length of vectors and use it to define a special metric on your space which will measure the distance between two vectors. In a metric space, the elements of the space don't even have to be vectors (and even if they are, the metric itself doesn't have to come from a norm) but you can still talk about the distance between two points in the space, open balls, etc. In a topological space, you can't talk about the distance between two points but you can talk about open neighborhoods.
Because of this inclusion, everything that works for general topological spaces will work in particular for all other spaces, but there are some things you can do in (say) normed vector spaces which don't make sense in a general topological space. For example, if you have a function $f \colon V \rightarrow \mathbb{R}$ on a normed vector space, you can define the directional derivative of $f$ at $p \in V$ in the direction $v \in V$ by the limit
$$ \lim_{t \to 0} \frac{f(p + tv) - f(p)}{t}. $$
In the definition, you are using the fact that you can add the vector $tv$ to the point $p$. If you try to mimick this definition in a topological space, then since the set itself doesn't have the structure of a vector space, you can't add two elements so this definition doesn't make sense. That's why during your studies you sometimes restrict your attention to a smaller category of spaces which has more structure so you can do more things in it.
You can discuss the notions of continuity, compactness only in the category (context) of topological spaces (but for reasons of simplicity it is often done in the beginning of one's studies in the category of metric spaces). However, once you want to discuss differentiability, then (in first approximation, before moving to manifolds) you need to restrict your category and work with normed vector spaces. If you also want to discuss the angle that two curves make, you will need to further restrict your category and work with inner product vector spaces in which the notion of angle makes sense, etc.
Best Answer
Since $$ d:X\times X\to [0,\infty) $$ is a metric, it satisfies the triangle inequality: $$ d(a_1,a_2)\le d(a_1,a_3)+d(a_3,a_2) \quad \forall a_1,a_2,a_3\in X. $$ Given $a=(a_1,a_2)\in X\times X$, we have for every $x=(x_1,x_2)\in X\times X$: $$ d(x_1,x_2)\le d(x_1,a_1)+d(a_1,a_2)+d(a_2,x_2), $$ and therefore $$\tag{1} d(x_1,x_2)-d(a_1,a_2)\le d(x_1,a_1)+d(x_2,a_2). $$ Also, for every $x=(x_1,x_2)\in X\times X$ we have: $$ d(a_1,a_2)\le d(a_1,x_1)+d(x_1,x_2)+d(x_2,a_2), $$ i.e. $$\tag{2} -\left[d(x_1,x_2)-d(a_1,a_2)\right]\le d(x_1,a_1)+d(x_2,a_2). $$ Combining (1) and (2) we get: $$ \left|d(x_1,x_2)-d(a_1,a_2)\right|\le d(x_1,a_1)+d(x_2,a_2)\quad \forall x=(x_1,x_2)\in X\times X, $$ which shows that $d$ is continuous at $a=(a_1,a_2)\in X\times X$, and therefore $d$ is continuous on $X\times X$ because $a$ is arbitrary.