In a quadratic equation ax^2 + bx + c = 0, there are two roots (either both real or both complex). The sum of the two roots is -\frac{b}{a} and the product of the two roots is given by \frac{c}{a}.
Use this to come up with four simultaneous equations for the 2 pairs of roots for the given equations. The sum of the roots of the first equation is twice that of the sum of the roots of the second equation. The product of the roots of the first equation is 4 times the product of the roots of the second equation. Do a few algebraic manipulations to get the required ratio. Specifically, the property for the product of the roots will allow you to express n in terms of m, and the property for the sum of the roots will allow you to express m in terms of p, the rest is easy.