Proof of a change-of-measure formula I was asked by someone with the following problem:

Suppose $X$ and $Y$ are compact metric spaces and $F: X \to Y$ is a continuous map from $X$ onto $Y$. If $\nu$ is a finite measure on the Borel sets of $Y$, prove that there exists a measure $\mu$ on the Borel sets of $X$ such that
  $$\int_Y f \, d\nu = \int_X f \circ F \, d \mu \tag{1}$$
  for all $f$ that are continuous on $Y$.

To me, equation $(1)$ bears very resemblance to the classic change-of-variable formula in measure theory:
$$\int_X f \circ F\,d\mu = \int_Y f \,d \nu \tag{2}.$$ 
However, in $(2)$, the measure $\mu$ is known first and the induced measure $\nu$
is defined through $\mu$ and $F$ (in fact, $\nu = \mu \circ F^{-1}$.). In addition, to prove $(2)$, we do not need the compactness, continuous and onto conditions given in the problem --- all we need are that $\mu$ is a finite measure and $F$ is measurable, then $(2)$ holds for any integrable $f$. 
Therefore, it looks like $(1)$ is another version of $(2)$, with seemingly stronger conditions but the more restricted conclusion (but again, the orders of
measures $\nu$ and $\mu$ are essentially opposite.).
It is said this is a problem from probability, but the typical tricks used in 
probability do not work for me. In particular, I don't know how to deploy the 
continuity condition. I appreciate any hint.
 A: As you said, if we have a measurable map $F: X \to Y$, we can always use $F$ to push measures forward from $X$ to $Y$ by defining the pushforward measure $\nu = \mu \circ F^{-1}$. In this problem, we need to go the other way around: we have a measure on $Y$ and we must pull it back to $X$. This is more difficult and we need additional assumptions. The idea is to find a measurable section of $F$, that is, a measurable map $G: Y \to X$ such that $F \circ G = id_Y$. (This amounts to choosing, in a measurable way, a unique preimage under $F$ for each $y \in Y$.) Then we may use $G$ to pushforward $\nu$ from $Y$ to $X$, and the resulting measure on $X$ will satisfy $(1)$.
In the context of your problem, the following theorem does the trick:

Theorem 6.9.7. (quoted from V. I. Bogachev, Measure Theory. Vol. II, Springer, 2007.)
Let $X$ be a compact metric space, let $Y$ be a Hausdorff topological space, and let $f:X \to Y$ be a continuous mapping. Then, there exists a Borel set $B\subset X$ such that $f(B) = f(X)$ and $f$ is injective on $B$. In addition, the mapping $f^{-1}:f(X) \to B$ is Borel.

You can find the proof in Bogachev's book here. The idea is to start with the case $X=[0,1]$. Here, for each $y \in F(X)$ we can select a preimage of $y$ under $F$ by taking the smallest one, i.e. we set $G(y) = \inf \, \{ x : F(x)=y \}$. In the general case, we use the fact that any compact metric space is the continuous image of some compact set $K \subset [0,1]$ and apply the previous case.
Returning to your problem, since $F$ is surjective the theorem gives a Borel measurable section $G:Y \to X$. The pushforward measure $\mu \equiv \nu \circ G^{-1}$ then satisfies $\nu = \mu \circ F^{-1}$, which is simply equation $(1)$ in the special case where $f$ is an indicator function. Equation $(1)$ for arbitrary integrable functions then follows by the usual approximation arguments.

The following goes beyond the question, but it might interest you that the assumptions that $X$ and $Y$ are compact metric spaces and that $F$ is continuous are not necessary. In Bogachev's book, there is the following generalization of your problem, which is much more involved:

Theorem 9.1.5. (quoted from V. I. Bogachev, Measure Theory. Vol. II, Springer, 2007.)
Let $X$ and $Y$ be Souslin spaces and let $f:X \to Y$ be a Borel mapping such that $f(X) = Y$. Then, for every Borel measure $\nu$ on $Y$, there exists a Borel measure $\mu$ on $X$ such that $\nu = \mu \circ f^{-1}$ and $|| \mu ||= ||\nu||$. If $f$ is a one-to-one mapping, then $\mu$ is unique.

(See here for the definition of "Souslin space".) The idea of the proof is still to find a measurable section $g: Y \to X$, but it is much more difficult in this general setting.
