Divide through by p
The sum of the roots is the coefficient of x with the opposite sign, -3q/p.
Since the roots are equal, let them be r and r.
The product of the roots is the constant term 9/p.
Since the roots are both r, their product is r2.
So we have a system of equations to solve
Solve the first for r
Substitute in the 2nd equation in the system:
Cross-multiply:
p cannot be 0, so we may divide both sides by it
Edwin