HINT:
Start with a compact subset $K$. $K$ is the intersection of a decreasing sequence of open subsets
$$K = \bigcap_{n=1}^{\infty} \{ x \in X \ | \ d(x,K) < \frac{1}{n} \}$$
Hence $\mu(K) = \lim \mu(U_n)$ by general properties of finite measures.
Consider the family $\mathcal{A}$ of subsets $A$ of $X$ with the following property: for every $\epsilon > 0$ there exist $K \subset A \subset U$, $K$ compact, $U$ open so that
$$\mu(U\backslash K ) < \epsilon$$
We want to show that all the borel subsets satisfy this property. So we'll show that the family of these subsets if a $\Sigma$ algebra containing the compact subsets.
From the above, the compact subsets are in $\mathcal{A}$. Then if $A$ is in $\mathcal{A}$, so is $X \backslash A$. Indeed if $K \subset A \subset U$ then
$X\backslash U \subset X\backslash A \subset X\backslash K$ ...
Now for countable unions. Let $A_1$, $A_2$ $\ldots$ in $\mathcal{A}$. Take $K_i \subset A_i \subset U_i$ and note that $(U_1\cup U_2\cup\ldots ) \backslash (K_1 \cup K_2\cup \ldots ) \subset (U_1\backslash K_1)\cup (U_2\backslash K_2)\cup \ldots$. Take $K_i \subset A_i \subset U_i$ so that $\mu(U_i\backslash K_i) < \epsilon/2^i$, and also note that we can approximate the infinite union of the $K_i$ with a finite union, which is compact.
Hence, the algebra $\mathcal{A}$ contains all the Borel subsets, which means that the measure $\mu$ is regular.
We only needed that compact subsets are countable intersections of open subsets. That is true if $X$ is a (compact) metric space, but may also hold for more general compact spaces ( see this example).
No, this does not form a metric in general. For a specific counterexample, consider the case $X = [0, 1]^2$, $Y = \{ (x, y) \in [0, 1]^2 \mid x \le y \}$, and $f : X \to Y$ is defined by $f(x, y) = (xy, y)$. Then for all points in $Y$ with $y \ne 0$, the inverse image of $(x, y)$ is a single point $\{ (x/y, y) \}$; whereas the inverse image of $(0, 0)$ is $[0, 1] \times \{ 0 \}$. Thus, for example, in the induced $d_1$ on $Y$, we have $d_1((0, 0.1), (0.1, 0.1)) = d((0, 0.1), (1, 0.1)) = 1$. On the other hand, $d_1((0, 0.1), (0, 0)) = 0.1$ and also $d_1((0, 0), (0.1, 0.1)) = 0.1$.
You could try to fix this by considering paths, e.g. define $d_1(x, y)$ to be the infimum of values of the form $d(x^*, x_1) + d(y_1, x_2) + \cdots + d(y_{n-1}, x_n) + d(y_n, y^*)$ where $f(x^*) = x$, $f(y^*) = y$, and $f(x_i) = f(y_i)$ for each $i$. Then it would be straightforward to show this does satisfy the triangle inequality. However, then the tricky part would be to show that this infimum is strictly positive for $x \ne y$. I'm not sure off the top of my head how (or even if) that could be proved, though it seems clear that compactness would have to come into play in any proof of such a fact.
Best Answer
Here is a way to use compactness once. Consider the given distance function $d:X\times X\to \mathbb R$. If $X$ is compact, then so is $X\times X$ (this is the easy part of Tychonoff that can actually be proved easily without recourse to anything complicated). Now, a continuous real-valued function on a compact set attains a maximum. The distance function is always (uniformly) continuous.
In case you are looking for a proof that avoids any topology: A metric space is compact if every sequence in it admits a convergent subsequence. Prove that if $X$ is compact, then so is $X\times X$. Then, suppose the distances were unbounded. Construct a sequence of pairs of points $(x_i,y_i)$ with unbounded distances. Extract a subsequence, use continuity of the distance function and get a contradiction. Thus the distances are bounded. Let $s$ be the supremum of all distances. Now construct a sequences of pairs as above that converges to the supremum. Extract a convergent subsequence, apply continuity of the distance function, and show the supermum is attained at the limit of the extracted subsequence.