Metric space and continuous function Background: This is an exercise problem from Munkres's Topology (Exercise 3 of Section 20 "The Metric Topology", 2nd edition). It has been posted at this site: Topology induced by metric space. However, I am confused about some basic conceptual problems which have not been mentioned there.

The Exercise: Let $X$ be a metric space with metric $d$.
  (a) Show that $d: X \times X \to \mathbb{R}$ is continuous.
  (b) Let $X'$ denote a space having the same underlying set as $X$. Show that if $d: X' \times X' \to \mathbb{R}$ is continuous, then the topology of $X'$ is finer than the topology of $X$.

I am quite confused about the underlying concepts in the exercise:    

Problem: (1) Why to use the word "if" in (b) (i.e., if $d: X' \times X' \to \mathbb{R}$ is continuous), since that any metric $d$ has been proved continuous in (1)?
  (2) In (b), are $X$ and $X'$ both metric spaces? If so, what are their metrics, respectively? If not, how to compare two topologies if one is a metric space while the other one not?

 A: $(1)$ Note that $X'$ is only a topological space, not necessarily a metric space, and $d$ is only a continuous map, not necessarily a metric inducing the topology on $X'$ (even though in this case it is a metric because $X'$ has the same underlying set as $X$, the topology on $X'$ may be different than the topology defined by the metric $d$).
$(2)$ We are given that $X$ is a metric space in the problem but $X'$ isn't necessarily a metric space (although it may be) - it is only apriori a topological space. The metric on $X$ is still $d$, and in this case the metric is used to define the topology on $X$.
$X'$ may be a metric space but it's possible that, even if it is, the metric isn't given by $d$. For instance if $X$ is $\{\frac{1}{n}\mid n\in\mathbb{N}^{+} \}\cup\{0\}$ with the induced metric $d$ from $\mathbb{R}$, then we can give $X'$ the discrete metric $d'$, and $d\colon X'\times X'\to\mathbb{R}$ would still be a continuous map  even though it is a different metric to $d$. (This idea of using the discrete metric for $X'$ works for any non-discrete metric space $X$). To see that these spaces really are different, note that $\{0\}\subset X$ is not an open set but $\{x\}\subset X'$ is open for all $x\in X'$ - that is, $X$ is not discrete but $X'$ is.
A: (1) The topology of $X'$ (which only shares the underlying set with $X$) is not given by the metric $d$ (which defines the topology on $X$). The exercise shos onl ythat $d$ is continuous with respect to the topology given by $d$.
(2) $X'$ is only called a "space" here. So unless this exercise is in a chapter where general topology (i.e. without metric) has not yet been introduced, I suppose tha t$X'$ is a general topological space. At any rate, the topologies of $X'$ and $X$ can be compared, both being a set of subsets of the underlying space.
