$\displaystyle \int(e^x - 3)^2 dx$

I think it goes as following, here is my working.

$\displaystyle \int (e^{2x} - 6e^x + 9) dx$

$\displaystyle = \frac{e^{2x}}{2} - e^x + 9x$

Can anyone confirm or tell me where I've gone wrong? Thank you very much.