how to solve quadratic problems