Let the two common roots be m and n, so the first equation can be written as (x - x1)(x - m)(x - n) = 0 and the second as (x - x2)(x - m)(x - n) = 0. Expanding these, the first gives x^3 - (x1+m+n)x^2 + ... = 0, so x1 + m + n = -5. The second equation gives x2 + m + n = -7. Subtracting the first equation's expanded form from the second gives (x3^3 - x1^3) + 2(x3^2 - x1^2) + (r - q) = 0, but an easier approach is subtracting the original equations to get 2x^2 + (r - q) = 0. Substituting this back reveals the non-common roots must balance the difference in the x^2 coefficients, yielding x1 = -5 and x2 = -7.