Let $B_{t}$ be a Brownian Motion, let $Y_{t}=exp\Big(\int_{0}^{t}g_{s}dB_{s}-\frac{1}{2}\int_{0}^{t}g_{s}^2ds\Big)$ for a progressively measurable $g$.
Let $X_{t}=B_{t}-\int_{0}^{t}g_{s}ds$.
I want to show that $X_{t}Y_{t}$ is a martingale.
Ito's Lemma shows that $Y_{t}$ is a martingale. I want to compute $d(X_{t}Y_{t})$ but I do not know the cross-variation of both processes. It has to be $\int_{0}^{t}Y_{s}g_{s}ds$, but why?
So, $$\,\mathrm d X_t=-g_t\,\mathrm d t+\,\mathrm d B_t,$$ and $$\,\mathrm d Y_t=Y_tg_t\,\mathrm d B_t.$$ Therefore $$\,\mathrm d \left<X,Y\right>_t=Y_tg_t\,\mathrm d t.$$