Hi, I'm really bad at basic math can someone please help me complete the square ><?

Then i let,

hmm! i really don't know what I'm doing but I'll just keep going..

yeahh i really don't know what to do but the answer is meant to be:

I know that eventually I'm meant to have

and then have the answer outside this integral, but i don't know how to do it. Please help me