How to solve problems involving quadratic inequality?​