solve a quadratic equation by completing the square