This is not really an answer to your question but shows you another route.
First some basics.
Let $\langle\Omega,\mathcal{A},\mathsf{P}\rangle$ denote the probability
measure space on which random variable $X$ is defined.
Then $X:\Omega\to\mathbb{R}$ is a measurable function in the meaning
that $X^{-1}\left(B\right)\in\mathcal{A}$ for every $B\in\mathcal{B}$
where $\mathcal{B}$ denotes the $\sigma$-algebra of Borelsets on
$\mathbb{R}$.
Here $X^{-1}\left(B\right)=\left\{ \omega\in\Omega\mid X\left(\omega\right)\in B\right\} $
and this set is also denoted by $\left\{ X\in B\right\} $ and $\mathsf{P}\left(\left\{ X\in B\right\} \right)$
is abbreviated by $\mathsf{P}\left(X\in B\right)$.
Further $X$ induces a probability measure $\mathsf{P}_{X}$ on $\mathcal{B}$
which is prescribed by $B\mapsto\mathsf{P}\left(X\in B\right)=\mathsf{P}\left(X^{-1}\left(B\right)\right)$.
This together results in a probability measure space $\langle\mathbb{R},\mathcal{B},\mathsf{P}_{X}\rangle$.
If $X$ is integrable wrt measure $\mathsf{P}$ then it has a so-called
expectation defined like this:
$$\mathsf{E}X=\int X\left(\omega\right)\mathsf{P}\left(d\omega\right)$$
and essential in this context is the equality: $$\int X\left(\omega\right)\mathsf{P}\left(d\omega\right)=\int x\mathsf{P}_{X}\left(dx\right)\tag1$$
The RHS of the equality is mostly written as $\int xdF_{X}\left(x\right)$
where $F_{X}$ is the CDF of $X$ which is completely determining
for $\mathsf{P}_{X}$.
This equality can be proved by first showing that it is valid for
indicator functions.
Note for instance that - if $X=1_{B}$ for some $B\in\mathcal{B}$
- we will find: $F_{X}\left(x\right)=\begin{cases}
0 & \text{if }x<0\\
1-\mathsf{P}\left(B\right) & \text{if }0\leq x<1\\
1 & \text{otherwise}
\end{cases}$
leading to $\int X\left(\omega\right)\mathsf{P}\left(d\omega\right)=\int1_{B}\left(\omega\right)\mathsf{P}\left(d\omega\right)=\mathsf{P}\left(B\right)=\int xdF_{X}\left(x\right)=\int x\mathsf{P}_{X}\left(dx\right)$.
Then it can easily be extended to step functions and finally to integrable functions.
If this is all well captured then the way is open to prove the equality in your question.
Let $\langle\Omega,\mathcal{A},\mathsf{P}\rangle$ denote the probability
measure space on which random variable $X$ is defined.
Let $U:\mathbb{R}\to\mathbb{R}$ be a random variable defined
on probability space $\langle\mathbb{R},\mathcal{B},\mathsf{P}_{X}\rangle$
and let it be integrable.
To emphasize that it is random variable I use capital $U$ instead of $u$.
It induces - as stated above - a probability space $\langle\mathbb{R},\mathcal{B},\left(\mathsf{P}_{X}\right)_{U}\rangle$
and we find easily that: $$\left(\mathsf{P}_{X}\right)_{U}=\mathsf{P}_{U\circ X}$$
by stating that for $B\in\mathcal{B}$ we have: $\left(\mathsf{P}_{X}\right)_{U}\left(B\right)=\mathsf{P}_{X}\left(U^{-1}\left(B\right)\right)=\mathsf{P}\left(X^{-1}\left(U^{-1}\left(B\right)\right)\right)=\mathsf{P}\left(\left(U\circ X\right)^{-1}\left(B\right)\right)=\mathsf{P}_{U\circ X}\left(B\right)$
Based on that we find:
$\int U\left(x\right)F_{X}\left(x\right)=\int U\left(x\right)\mathsf{P}_{X}\left(dx\right)=\int u\mathsf{P}_{U\circ X}\left(du\right)=\int U\circ X\left(\omega\right)\mathsf{P}\left(d\omega\right)=\mathsf{E}\left(U\circ X\right)$
The second equality and third equation are both applications of $(1)$. The second uses that $U$ is a random variable on $\langle\mathbb{R},\mathcal{B},\mathsf{P}_{X}\rangle$ and the third equality uses that $U\circ X$ is a random variable on $\langle\Omega,\mathcal{A},\mathsf{P}\rangle$.