Solving by completing the square