Goal

Show that

$$ e^{bB_t-b^2 t/2} $$

is a martingale.

Choose the function

Let

$$ f(t,z)=e^{at+bz}. $$

Then

$$ \frac{\partial f}{\partial t}=af, \qquad \frac{\partial f}{\partial z}=bf, \qquad \frac{\partial^2 f}{\partial z^2}=b^2 f. $$

Apply Ito formula

For $Z_t=B_t$,

$$ df(t,B_t)

\left(a+\frac{b^2}{2}\right)f(t,B_t),dt + bf(t,B_t),dB_t. $$

To eliminate the drift, set

$$ a=-\frac{b^2}{2}. $$

Then the $dt$ term vanishes, so

$$ e^{bB_t-b^2 t/2} $$

is a martingale.