Formation of quadratic equation when roots are given