Exponentials and trig functions

Hi, I'm having some trouble understanding the relationships between trig functions and exponential functions. I have a question with answers and just can't see how they simplify down to get to where they do

Now when i try to intergrate I get a bit of a crazy formula with lots of e's and I'm pretty confident it will simplify to what the answer is but I'm not sure how to.

The intergral I get is

I can't really see how to simplify it to get required answer. At a guess the second part simplifies to zero Because ??? and the first part to and if then im done, but this is making big guesses about how these exponentials work which I've no idea if its correct!! Sorry if this is really obvious and im being dumb! Thanks for any help - even if its just refferring me to a list of exponential identities!