Let, f(x) =x³ +px²+x+6
g(x) = 2x³ - x²+(p+3)x -6
Now , when we divide by (x -3) both equations give same remainder.
Let the remainder be 'r'.
So, When we substitute x = 3 . Then they give 'r' as the value.
So, f(3) → 3³ + p(3²) + 3 + 6 = r .
⇒ 27 + 9p + 9 = r
⇒ 36 +9p = r - (i)
g(3) → 2(3³) - 3² + 3(p+3) -6 = r
⇒ 54 - 9 + 3p + 9 -6 =r
⇒ 48 +3p = r - (ii)
Now equate (i) & (ii).
Then, 48 + 3p = 36 + 9p ( r = r)
48 - 36 = 9p - 3p
12 = 6p
Therefore p = 2.