Let the process $S_t$ be given by $$dS_t = S_t(\mu_tdt + \sigma dW_t) $$ for constants $\mu>0,\sigma>0$ and $W_t$ is a standard Brownian motion under probability measure $P$. Let us define a new measure $\frac{dQ}{dP} = exp(-\lambda W_T - 0.5*\lambda^2 T )$ which is simply the Radom-Nikodym derivative for $\lambda=\frac{\mu-r}{\sigma}$.
Apply Bayes rule and show that $$E^Q[S_T] = S_0e^{rT} $$
I know how to derive this using Girsanov theorem. That is, we can write $dW_t^Q = dW_t + \lambda dt$ and we have it. But I want to derive this using Bayes rule and computing the expectations. This is how I started $$E^Q[S_T] = E^P[\frac{dQ}{dP}S_T] = E[e^{-\lambda W_T - 0.5\lambda^2 T }S_te^{(\mu-0.5\sigma^2)T + \sigma W_T}] $$
but substituting out $\lambda=\frac{\mu-r}{\sigma}$ in the above expression does not lead to the result. Where did I go wrong? Many thanks.
First of all, you want to evaluate $S$ in $t=0$, that is, $S_0$, otherwise you cannot get rid of the expectation on it and you have to resort to a conditional expectation wrt the sigma algebra in $t$. Moreover, you cannot really use the $T$ index, if you do not start at 0 (you would have to use $(T-t)$).
Then, collect the terms in $W_T$ and apply the moment generating function for a standard normal to those as follows.
$$ E^Q[S_T] = E^P[\frac{dQ}{dP}S_T] = E^P[e^{-\lambda W_T - 0.5\lambda^2 T }S_0e^{(\mu-0.5\sigma^2)T + \sigma W_T}] $$
$$ = S_0E^P[e^{(\mu-0.5\sigma^2)T - 0.5\lambda^2 T }e^{-\lambda W_T + \sigma W_T}] $$
$$ = S_0E^P[e^{(\mu-0.5\sigma^2)T - 0.5\lambda^2 T }e^{-\lambda W_T + \sigma W_T}] $$
$$ = S_0e^{(\mu-0.5\sigma^2)T - 0.5\lambda^2 T }E^P[e^{-\lambda W_T + \sigma W_T}] $$
$$ = S_0e^{(\mu-0.5\sigma^2)T - 0.5\lambda^2 T }e^{0.5(-\lambda + \sigma)^2 T} $$
$$ = S_0e^{(\mu-0.5\sigma^2 - 0.5\lambda^2 + 0.5\lambda^2 + 0.5\sigma^2 - \lambda\sigma) T} $$
$$ = S_0e^{(\mu - \lambda\sigma) T} = S_0e^{(\mu - \frac{\mu - r}{\sigma}\sigma) T} = S_oe^{rT}. $$