[proofplan]
We first record the basic properties of the distribution function $F$ that follow from the fact that $\mu$ is a Borel probability measure: monotonicity, right-continuity, and the limits at $\pm\infty$. These properties imply that the quantile set $\{y\in\mathbb R:F(y)\ge p\}$ is nonempty and bounded below for every $p\in(0,1)$, so $Q(p)$ is a real number. The main point is the inverse-threshold equivalence $Q(p)\le x$ if and only if $p\le F(x)$; right-continuity is used in the direction from $Q(p)\le x$ to $p\le F(x)$. This equivalence gives measurability of $Q$ and then converts the event $\{X\le x\}$ into the event $\{U\le F(x)\}$, whose probability is $F(x)$ by uniformity.
[/proofplan]
[step:Verify the distribution function properties needed for the quantile argument]
For $x_1,x_2\in\mathbb R$ with $x_1\le x_2$, we have $(-\infty,x_1]\subseteq(-\infty,x_2]$, hence monotonicity of the measure $\mu$ gives
\begin{align*}
F(x_1)\le F(x_2).
\end{align*}
Thus $F$ is nondecreasing.
We next prove right-continuity. Fix $x\in\mathbb R$, and let $(x_n)_{n\ge 1}$ be any sequence in $\mathbb R$ such that $x_n\downarrow x$. Define Borel sets $A_n:=(-\infty,x_n]$ for $n\in\mathbb N$. Then $(A_n)_{n\ge 1}$ is decreasing and
\begin{align*}
\bigcap_{n=1}^{\infty}A_n=(-\infty,x].
\end{align*}
Since $\mu(A_1)\le 1<\infty$, continuity from above for finite measures gives
\begin{align*}
\lim_{n\to\infty}\mu(A_n)=\mu\left(\bigcap_{n=1}^{\infty}A_n\right).
\end{align*}
Therefore
\begin{align*}
\lim_{n\to\infty}F(x_n)=F(x).
\end{align*}
This proves right-continuity of $F$.
Finally, define $B_n:=(-\infty,-n]$ and $C_n:=(-\infty,n]$ for $n\in\mathbb N$. Then $B_n\downarrow\varnothing$, so continuity from above gives
\begin{align*}
\lim_{n\to\infty}F(-n)=0.
\end{align*}
Also $C_n\uparrow\mathbb R$, so continuity from below gives
\begin{align*}
\lim_{n\to\infty}F(n)=1.
\end{align*}
Since $F$ is nondecreasing, these sequential limits imply
\begin{align*}
\lim_{x\to-\infty}F(x)=0
\end{align*}
and
\begin{align*}
\lim_{x\to\infty}F(x)=1.
\end{align*}
[guided]
We need exactly the structural facts about $F$ that make an inverse-threshold construction work. First, if $x_1\le x_2$, then the interval $(-\infty,x_1]$ is contained in $(-\infty,x_2]$. Because $\mu$ is a measure, it is monotone on Borel sets, and therefore
\begin{align*}
F(x_1)=\mu((-\infty,x_1])\le \mu((-\infty,x_2])=F(x_2).
\end{align*}
So $F$ is nondecreasing.
The next point is right-continuity. Fix $x\in\mathbb R$, and let $(x_n)_{n\ge 1}$ be a decreasing sequence with $x_n\downarrow x$. Define
\begin{align*}
A_n:=(-\infty,x_n]
\end{align*}
for each $n\in\mathbb N$. These sets are Borel sets because they are closed intervals of the form $(-\infty,a]$. Since $x_{n+1}\le x_n$, the sets decrease:
\begin{align*}
A_{n+1}\subseteq A_n.
\end{align*}
Their intersection is precisely $(-\infty,x]$: a real number belongs to every $(-\infty,x_n]$ exactly when it is at most the limit $x$. Since $\mu(A_1)\le \mu(\mathbb R)=1<\infty$, continuity from above for finite measures applies and gives
\begin{align*}
\lim_{n\to\infty}\mu(A_n)=\mu\left(\bigcap_{n=1}^{\infty}A_n\right)=\mu((-\infty,x]).
\end{align*}
By the definition of $F$, this is
\begin{align*}
\lim_{n\to\infty}F(x_n)=F(x).
\end{align*}
This is the right-continuity of $F$.
Finally, we verify the endpoint limits. Define $B_n:=(-\infty,-n]$ for $n\in\mathbb N$. Then $B_n\downarrow\varnothing$, and continuity from above gives
\begin{align*}
\lim_{n\to\infty}F(-n)=\lim_{n\to\infty}\mu(B_n)=\mu(\varnothing)=0.
\end{align*}
Define also $C_n:=(-\infty,n]$. Then $C_n\uparrow\mathbb R$, and continuity from below gives
\begin{align*}
\lim_{n\to\infty}F(n)=\lim_{n\to\infty}\mu(C_n)=\mu(\mathbb R)=1.
\end{align*}
Because $F$ is nondecreasing, the integer limits force the full real limits:
\begin{align*}
\lim_{x\to-\infty}F(x)=0
\end{align*}
and
\begin{align*}
\lim_{x\to\infty}F(x)=1.
\end{align*}
These facts will be used to ensure that each quantile is finite and to prove the threshold equivalence.
[/guided]
[/step]
[step:Show that every quantile value is finite]
Fix $p\in(0,1)$, and define
\begin{align*}
A_p:=\{y\in\mathbb R:F(y)\ge p\}.
\end{align*}
Since $\lim_{y\to\infty}F(y)=1$ and $p<1$, there exists $b\in\mathbb R$ such that $F(b)\ge p$, so $A_p\neq\varnothing$. Since $\lim_{y\to-\infty}F(y)=0$ and $p>0$, there exists $a\in\mathbb R$ such that $F(a)<p$. For every $y\le a$, monotonicity of $F$ gives $F(y)\le F(a)<p$, hence $y\notin A_p$. Therefore $A_p\subseteq(a,\infty)$.
Thus $A_p$ is nonempty and bounded below, so its infimum is a real number. Consequently $Q(p)\in\mathbb R$ for every $p\in(0,1)$.
[/step]
[step:Prove the inverse-threshold equivalence using right-continuity]
We claim that for every $p\in(0,1)$ and every $x\in\mathbb R$,
\begin{align*}
Q(p)\le x\quad\iff\quad p\le F(x).
\end{align*}
Fix $p\in(0,1)$ and $x\in\mathbb R$. If $p\le F(x)$, then $x\in A_p$, where
\begin{align*}
A_p:=\{y\in\mathbb R:F(y)\ge p\}.
\end{align*}
Since $Q(p)=\inf A_p$, it follows that $Q(p)\le x$.
Conversely, assume $Q(p)\le x$. For each $n\in\mathbb N$, the number $x+\frac{1}{n}$ is strictly larger than $\inf A_p$. By the defining property of the infimum, there exists $y_n\in A_p$ such that
\begin{align*}
y_n<x+\frac{1}{n}.
\end{align*}
Since $y_n\in A_p$, we have $F(y_n)\ge p$. Also $y_n<x+\frac{1}{n}$, so monotonicity gives
\begin{align*}
p\le F(y_n)\le F\left(x+\frac{1}{n}\right).
\end{align*}
Taking the limit as $n\to\infty$ and using right-continuity of $F$ at $x$, because $x+\frac{1}{n}\downarrow x$, gives
\begin{align*}
p\le F(x).
\end{align*}
This proves the equivalence.
[guided]
The equivalence
\begin{align*}
Q(p)\le x\quad\iff\quad p\le F(x)
\end{align*}
is the core of the theorem. It says that the event that the quantile at level $p$ lies below $x$ is exactly the same as the condition that the level $p$ lies below the distribution value at $x$.
Fix $p\in(0,1)$ and $x\in\mathbb R$, and define
\begin{align*}
A_p:=\{y\in\mathbb R:F(y)\ge p\}.
\end{align*}
By definition, $Q(p)=\inf A_p$.
First suppose $p\le F(x)$. Then $x$ itself belongs to $A_p$. Since the infimum of a set is less than or equal to every element of the set, we get
\begin{align*}
Q(p)=\inf A_p\le x.
\end{align*}
Now suppose $Q(p)\le x$. The subtle point is that $Q(p)$ may not itself belong to $A_p$ before we use right-continuity, so we cannot immediately write $F(Q(p))\ge p$. Instead, we approximate the infimum from above. For each $n\in\mathbb N$, the number $x+\frac{1}{n}$ is larger than $Q(p)=\inf A_p$. Therefore the defining property of the infimum gives an element $y_n\in A_p$ satisfying
\begin{align*}
y_n<x+\frac{1}{n}.
\end{align*}
Because $y_n\in A_p$, we have
\begin{align*}
F(y_n)\ge p.
\end{align*}
Because $F$ is nondecreasing and $y_n<x+\frac{1}{n}$, we also have
\begin{align*}
F(y_n)\le F\left(x+\frac{1}{n}\right).
\end{align*}
Combining these inequalities yields
\begin{align*}
p\le F\left(x+\frac{1}{n}\right)
\end{align*}
for every $n\in\mathbb N$. The sequence $x+\frac{1}{n}$ decreases to $x$, so right-continuity of $F$ at $x$ gives
\begin{align*}
\lim_{n\to\infty}F\left(x+\frac{1}{n}\right)=F(x).
\end{align*}
Passing to the limit in the inequality $p\le F(x+\frac{1}{n})$ gives
\begin{align*}
p\le F(x).
\end{align*}
This proves the reverse implication and hence the equivalence.
[/guided]
[/step]
[step:Deduce measurability of the quantile map and of the transformed random variable]
For each $x\in\mathbb R$, the inverse-threshold equivalence gives
\begin{align*}
Q^{-1}((-\infty,x])=\{p\in(0,1):p\le F(x)\}.
\end{align*}
Since $F(x)\in[0,1]$, this set is either $\varnothing$, or $(0,F(x)]$, or all of $(0,1)$. In every case it belongs to $\mathcal B((0,1))$. Therefore $Q:(0,1)\to\mathbb R$ is Borel measurable, because the half-lines $(-\infty,x]$ generate $\mathcal B(\mathbb R)$.
Since $U:(\Omega,\mathcal F)\to((0,1),\mathcal B((0,1)))$ is measurable and $Q:(0,1)\to\mathbb R$ is Borel measurable, the composition
\begin{align*}
X=Q\circ U:\Omega\to\mathbb R
\end{align*}
is $\mathcal F/\mathcal B(\mathbb R)$-measurable.
[/step]
[step:Compute the distribution function of the transformed random variable]
Fix $x\in\mathbb R$. Using the definition $X=Q\circ U$ and the inverse-threshold equivalence with $p=U(\omega)$, we obtain
\begin{align*}
\{\omega\in\Omega:X(\omega)\le x\}=\{\omega\in\Omega:U(\omega)\le F(x)\}.
\end{align*}
Since $F(x)\in[0,1]$ and $U\sim\operatorname{Unif}(0,1)$, the defining distribution function of the uniform law gives
\begin{align*}
\mathbb P(\{\omega\in\Omega:U(\omega)\le F(x)\})=F(x).
\end{align*}
Therefore
\begin{align*}
\mathbb P(\{\omega\in\Omega:X(\omega)\le x\})=F(x).
\end{align*}
Since $x\in\mathbb R$ was arbitrary, $X$ has distribution function $F$.
[/step]