Both cubics have zero
x2 coefficient, so their roots sum to
0: the third root of
p is
t=−r−s, and the third root of
q is
−(r+4)−(s−3)=t−1. The coefficient of
x is
a in both, so
rs+st+tr=(r+4)(s−3)+(s−3)(t−1)+(t−1)(r+4), which simplifies to
t=4r−3s+13.
The constant terms give
b=−rst and
b+240= −(r+4)(s−3)(t−1), so
240= rst−(r+4)(s−3)(t−1), i.e.
rs−4st+3tr−3r +4s+12t−252=0. Substituting
t=4r−3s+13 reduces this to
12[(r−s)2+7(r−s)−8]=0, so
r−s=1 or
r−s=−8.
If
r−s=1, then
t=4r−3s+13=r+16 and
t=−r−s=−2r+1, so
r=−5: the roots are
−5, −6, 11, and
b=−rst=−330. If
r−s=−8, then
t=r−11=−2r−8, so
r=1: the roots are
1, 9, −10, and
b=90. The requested sum is
330+90=420.