I came across the following exercise in Stochastic Calculus:
Let $B=(B_t)_{t\geq0}$ be a standard Brownian motion. Let also $M$ be the following process:
$M_t=B^4_t-6t(B^2_t-\dfrac{t}{3})$ for $t\geq0$
Prove that $M=(M_t)_{t\geq0}$ is a martingale and if we set $\sigma=inf\{t\geq0 : |B_t|=\sqrt{3}\}$, compute $\mathbb{E}[M_{\sigma}]$ and $\mathbb{E}[\sigma^2]$.
It was easy to prove the martingale part. Can we use the Optional Sampling Theorem for $\sigma$ and if so, how can we calculate $\mathbb{E}[\sigma^2]$?