Application of the Girsanov theorem Let $B_t$ denote the standard brownian motion. In a homework exercise we are asked to use the Girsanov theorem to compute
\begin{equation}
\mathbb{E}\bigg((B_t-t)^2\exp\bigg(\int_0^t e^{-s}\, dB_s\bigg) \bigg) \tag{1}
\end{equation}
After reading about the Girsanov theorem I fail to understand how to apply it in this particular situation. My attempt so far is to first note that 
$$
\mathbb{E}\bigg(\frac{1}{2}\int_0^t e^{-2s}\,ds\bigg) = \mathbb{E}\bigg(\frac{1}{4}\big(1-e^{-2t}\big) \bigg) < \infty , \ \forall t\geq 0
$$
hence the Novikov condition is satisfied. In the theory I've read, this means that if we set
$$
L_t = \exp\bigg(-\int_0^te^{-s}\,dB_s - \frac{1}{2}\int_0^te^{-2s}\,ds \bigg)
$$
and the denote by $Y_t = (B_t - t)^2$ and further if the expectation in equation (1) is with respect to some probability measure $\mathbb{P}$ there exists a probability measure $\mathbb Q$ such that
\begin{equation}
\mathbb E_{\mathbb Q}\bigg( Y_t \bigg) = \mathbb E_{\mathbb P}\bigg( Y_t L_t \bigg)
\end{equation}
Here is where I'm stuck, first, in equation (1) there is no minus sign in the exponential, nor is the quadratic term present. Where do I go from here?
 A: Set
$$q_T := \exp \left( \int_0^T e^{-s} dB_s - \frac{1}{2} \int_0^T e^{-2s} \, ds \right).$$
By Girsanov's theorem, the process
$$W_t := B_t - \int_0^t e^{-s} \, ds, \qquad t \leq T,$$
is a Brownian motion with respect to the probabillity measure $\mathbb{Q}:=\mathbb{Q}_T := q_T \, \mathbb{P}$. We have
\begin{align*} &\mathbb{E} \left[ (B_T-T)^2 \exp \left( \int_0^T e^{-s} \, dB_s \right) \right] \\&= \exp \left( \frac{1}{2} \int_0^T e^{-2s} \, ds \right) \mathbb{E} \left[ \left( W_T + \int_0^T e^{-s} \, ds-T \right)^2 q_T \right] \\ &= \exp\left( \frac{1-e^{-2T}}{4} \right) \mathbb{E}_{\mathbb{Q}}  \left[ \left( W_T +(1-e^{-T}-T)\right)^2 \right].\tag{1}\end{align*}
For brevity set $f(T) := 1-e^{-T}-T$, then
$$(W_T+f(T))^2 = W_T^2  + 2W_T f(T) +f(T)^2$$
and taking expectation (w.r.t to $\mathbb{Q}$) we get
$$\mathbb{E}_{\mathbb{Q}} ((W_T+f(T))^2) = \underbrace{\mathbb{E}_{\mathbb{Q}}(W_T^2)}_{=T} + 2 f(T) \underbrace{\mathbb{E}_{\mathbb{Q}}(W_T)}_{=0} + f(T)^2 = T+f(T)^2.$$
Plugging this into $(1)$ gives
\begin{align*} \mathbb{E} \left[ (B_T-T)^2 \exp \left( \int_0^T e^{-s} \, dB_s \right) \right] &= \exp \left( \frac{1-e^{-2T}}{4} \right) (T+f(T)^2) \\ &= \exp \left( \frac{1-e^{-2T}}{4} \right) (T+(1-e^{-T}-T)^2). \end{align*}
