Solution (source code)

= Solution

For $g\geq0$, the <Tonelli theorem> and conditioning on $N_t$ give
$$
\mathbb E[X_t\mid N_t]
=N_t\mathbb E[g(Y_1)]
=N_t\int_0^1g(y)\,dy.
$$
Since $\mathbb E[N_t]=\lambda t$,
$$
\boxed{\mathbb E[X_t]
=\lambda t\int_0^1g(y)\,dy,}
$$
with both sides allowed to be $+\infty$.