Solution (source code)

= Solution

On the right-hand side, $\mathbb E_x$ means that the reference <Brownian motion> starts at $B_0=x$; on the left it means the <stochastic differential equation> starts at $X_0=x$. Since $h$ is smooth and compactly supported, $h'$ is bounded and globally <Lipschitz continuous>. Define the <stochastic exponential>
$$
D_t=\exp\!\left(\int_0^t h'(B_s)\,dB_s-\frac12\int_0^t h'(B_s)^2\,ds\right).
$$
The <Novikov condition> holds on every finite horizon $T$, because $\mathbb E\exp(\frac12\int_0^Th'(B_s)^2ds)\leq\exp(T\|h'\|_\infty^2/2)$. Thus $D$ is a true <martingale>. Under $d\mathbb Q=D_Td\mathbb P$, the <Girsanov theorem> makes $\widehat B_t=B_t-x-\int_0^th'(B_s)ds$ a standard <Brownian motion> for $t\leq T$. Consequently $B$ under $\mathbb Q$ solves the prescribed <stochastic differential equation>; the <existence and pathwise uniqueness theorem for a stochastic differential equation> identifies its law with that of $X$.

The <Itô formula> gives $\int_0^t h'(B_s)dB_s=h(B_t)-h(x)-\frac12\int_0^th''(B_s)ds$. Hence, for any bounded measurable $f$,
$$
\boxed{\mathbb E_xf(X_t)=\mathbb E_x\!\left[\exp\!\left(h(B_t)-h(x)-\int_0^tV(B_s)\,ds\right)f(B_t)\right],\quad V=\frac12(h')^2+\frac12h''.}
$$
The finite-horizon argument applies separately to every $t\geq0$.