Alright so,
Rearragnge the equation to better see what to do!
Now, complete the square for
to:
Remember, this is done by using
Do the same with
You'll get
Which is
Do this for the rest.
Yo Latex is a blast. Never put so much effort into the steps of a simple question