We want to solve the quadratic equation:

by completing the square. For doing so, we will add a number to both sides for getting a square number at the left side. As the number at the side of the x is -8, when we divide by 2, we get:

We want to convert the number -7 to 16, so we will add 26 both sides:

And as we want to transform into the form:

This means that p=4 and q=23.