How is $U$ measurable in this construction involved Taylor's expansion? I'm reading below lemma in this note. The result is used in the proof of central limit theorem.


Lemma 9.11. Let $g \in C_b^3 (\mathbb R)$ and $X, Y, Z$ be real-valued random variables such that $X$ is independent of both $Y$ and $Z, \mathbb{E}(Y)=\mathbb{E}(Z), \mathbb{E}\left(Y^2\right)=\mathbb{E}\left(Z^2\right)$ and $\mathbb{E}\left(|Y|^3\right)<+\infty, \mathbb{E}\left(|Z|^3\right)<+\infty$. Then
$$
|\mathbb{E}(g(X+Y))-\mathbb{E}(g(X+Z))| \leq \frac{C}{6}\left(\mathbb{E}\left(|Y|^3\right)+\mathbb{E}\left(|Z|^3\right)\right)
$$
where $C=\sup _{x \in \mathbb{R}}\left|g^{\prime \prime \prime}(x)\right|$.

What this lemma is essentially saying is that provided both $Y$ and $Z$ are "small" random variables, one may trade $Y$ for $Z$ in the expression $\mathbb{E}(g(X+Y))$ without changing much the value of the expectation.
Proof. By Taylor's expansion, we obtain for real numbers $x, y$ :
$$
g(x+y)=g(x)+y g^{\prime}(x)+\frac{y^2}{2} g^{\prime \prime}(x)+\frac{y^3}{6} g^{\prime \prime \prime}(u)
$$
for some $u$ such that $|u-x| \le |y|$. The independence of $X$ and $Y$ then implies that
$$
\mathbb{E}(g(X+Y))=\mathbb{E}(g(X))+\mathbb{E}(Y) \mathbb{E}\left(g^{\prime}(X)\right)+\frac{1}{2} \mathbb{E}\left(Y^2\right) \mathbb{E}\left(g^{\prime \prime}(X)\right)+\frac{1}{6} \mathbb{E}\left(Y^3 g^{\prime \prime \prime}(U)\right)
$$
where $U$ is a random variable satisfying $|U-X| \leq|Y|$. Similarly, one may write
$$
\mathbb{E}(g(X+Z))=\mathbb{E}(g(X))+\mathbb{E}(Z) \mathbb{E}\left(g^{\prime}(X)\right)+\frac{1}{2} \mathbb{E}\left(Z^2\right) \mathbb{E}\left(g^{\prime \prime}(X)\right)+\frac{1}{6} \mathbb{E}\left(Z^3 g^{\prime \prime \prime}(V)\right)
$$
where $V$ is a random variable satisfying $|V-X| \leq|Z|$. By the assumptions made, we obtain
$$
\mathbb{E}(g(X+Y))-\mathbb{E}(g(X+Z))=\frac{1}{6}\left(\mathbb{E}\left(Y^3 g^{\prime \prime \prime}(U)\right)-\mathbb{E}\left(Z^3 g^{\prime \prime \prime}(V)\right)\right)
$$
So
$$
|\mathbb{E}(g(X+Y))-\mathbb{E}(g(X+Z))| \leq \frac{C}{6}\left(\mathbb{E}\left(|Y|^3\right)+\mathbb{E}\left(|Z|^3\right)\right)
$$
which completes the proof.

My understanding For each $x,y \in \mathbb R$, there is $u \in \mathbb R$ such that $|u-x| \le |y|$ and that
$$
g(x+y)=g(x)+y g^{\prime}(x)+\frac{y^2}{2} g^{\prime \prime}(x)+\frac{y^3}{6} g^{\prime \prime \prime}(u).
$$
Assume our probability space is $(\Omega, \mathcal F, \mathbb P)$. Then for each $\omega \in \Omega$, we can define $U(\omega) := u$ where $u$ satisfies above conditions for $x := X(\omega)$ and $y := Y(\omega)$.

Could you explain how $U$ is a random variable, i.e., it is measurable?

 A: There is no need to worry about measurability of $U$ or $V$ in your posting. Define
$$R(X,Y,Z)=\Big(g(X+Y)-g(X+Z)\Big)-\Big(g'(X)(Y-Z)+\frac12g''(X)(Y^2-Z^2)\Big)$$
This is clearly a well defined random variable.
One the other hand,  by Taylor's theorem, for each $\omega\in\Omega$, there are $t(\omega), \tilde{t}(\omega)\in(0,1)$ such that
$$
R(X(\omega),Y(\omega),Z(\omega))=\frac16\Big(g'''(X(\omega)+t(\omega)Y(\omega))Y^3(\omega)-g'''(X(\omega)+\tilde{t}(\omega)Z(\omega))Z^3(\omega)\Big)
$$
and so,
$$|R(X(\omega),Y(\omega),Z(\omega))|\leq\frac16C\big(|Y(\omega)|^3+|Z^3(\omega)|\big)$$
for all $\omega\in \Omega$, on account that $g'''$ is bounded.
Consequently
\begin{align}
\big|\mathbb{E}[g(X+Y)-g(X+Z)]&\big|\leq\big|\mathbb{E}[g'(X)(Y-Z)+\frac12g''(X)(Y^2-Z^2)]\big|+|\mathbb{E}[R(X,Y,Z)]|\\
&\leq \frac16C\big(\mathbb{E}[|Y|^3+|Z|^3]\big)
\end{align}
A: In general case $U$ is not measurable. So there's a micromistake in the proof but lemma still works.
In fact we don't need $U$ to be a r.v.. But $Y^3 g^{\prime \prime \prime}(U)$ is a r.v. because
$$
g(X+Y)=g(X)+Y g^{\prime}(X)+\frac{1}{2}Y^2 g^{\prime \prime}(X)+\frac{1}{6} \left(Y^3 g^{\prime \prime \prime}(U)\right)
$$
and hence
$$
Y^3 g^{\prime \prime \prime}(U) = 6\left( -g(X+Y)+g(X)+Y g^{\prime}(X)+\frac{1}{2}Y^2 g^{\prime \prime}(X)\right).
$$
It means that  $\mathbf{E}Y^3 g^{\prime \prime \prime}(U)$ is well-defined.
