Answer:
p=3, q=5
Explanation:
f(x) = x³-x²+px+q
factor: x+1 = 0 x = -1
(-1)³ - (-1)² + p*(-1) + q = 0
-2 - p + q = 0
p = q-2
(x-1) is factor of f(x) - 8, root x = 1 : f(x) = x³-x²+(q-2)x+q-8
(1)³ - (1)² + (q-2)(1) + q - 8 = 0
q - 2 + q - 8 = 0
2q = 10 q = 5
p = q-2 = 3
check: x³-x²+3x+5 = (x+1)(x²-2x+5)
x³-x²+3x+5 = (x²+3)(x-1) + 8