I'm currently writing my thesis in which I compare a series of ESG General Equilibrium models. I fell over this proof in Pastor, Stambaugh, Taylor Sustainable Investing in Equilibrium (2019) page 42. Here, they prove going from a given utility function to the models portfolio weights. These are the calculations of which I simply don't understand how they start on the second line and arrive at the third: \begin{align} \mathbb{E}( V(\tilde{W}_{1i},X_i)) &=\mathbb{E}(-e^{-A_i(W_{0i}(1+r_f+X'_i \tilde{r})-b'_iX_i)} \\&= -e^{a_i(1+r_f)} \mathbb{E}( e^{-a_i X_i'(\tilde{r}+\frac{1}{a_i} b_i)})\\ &= -e^{a_i(1+r_f)} ( e^{-a_i X_i'(\mathbb{E}(\tilde{r})+\frac{1}{a_i} b_i)+\frac{1}{2}a^2_i X'_i\Sigma X_i}) \end{align} We've previously defined $\tilde{r}\sim(\mu,\Sigma) $.
I've been staring at this for hours. I hope somebody can help me out with a hint on what is happening between these two steps.