Solution (source code)

= Solution

For $f_t(i,\ell)=\mathbb E_i[g(\ell+L(t))1_{X(t)=j}]$, part (a) gives $Mf_t=\partial_tf_t$. Apply part (b), integrate in $t$ from zero to infinity, and integrate by parts in time. Compact support makes the terminal term vanish, while $f_0(i,\ell)=g(\ell)1_{i=j}$. Moving the resulting Gaussian derivatives once more by parts yields the stated identity with $y_iy_j$.