A general method would be to compute a and b with the general solution formula for quadratic equations. However, a special property of quadratic equations can make this a lot easier. In fact, given the equation px^2+qx+r=0, calling the solutions A and B, we have that A+B=-q/p, and AB=r/p. This gives the answer in a second, as A+B=-3, AB=7/2.