Suppose one of the roots is a the second is 2a. The factors will be: (x-a) and (x-2a) thus (x-a)(x-2a)=x^2+6x+q x^2-xa-2ax+2a^2=x^2+6x+q taking corresponding terms we shall have: -2ax=6x solving for a we get -2a=6 thus a=-3 but q=2a^2 substituting the value of a we get: q=2(-3)^2 q=2*9 q=18