I'm going to call your roots (r11, r12, r21, r22)
r21=r11−1r22=r12−1
p1=x2+cx+a=(x−r11)(x−r12)=x2−(r11+r12)x+r11r12p2=x2+(2−r11−r12)x+(1−r11−r12+r11r12)
the coefficient a appears in both polynomials so we can solve for the rootsr11r12=2−r11−r12Solving this we find that there are two possibilities(r11, r12)=(−2, −4) or(r11, r12)=(0, 2)
In the first case we then have(r21, r22)=(−3,−5)p1(x)=(x+2)(x+4)=x2+6x+8⇒a=8, c=6p2(x)=(x+3)(x+5)=x2+8x+15⇒b=15a+b+c=8+15+6=29
In the second case we have(r21, r22)=(−1,1)p1(x)=(x−0)(x−2)=x2−2x⇒a=0, c=−2p2(x)=(x+1)(x−1)=x2−1⇒b=−1a+b+c=0−1−2=−3
Someone please double check all of this.