find the value of p and q so that x-1 and x-2 shall be factors of x^3-px^2+2x+q,what the third factor?

(x-1)(x-2)(x-k)

= x^3 - (k+3)x^2 + (3k+2)x - 2k

k+3 = p
3k+2 = 2
q = -2k

Looks like k=0, so
p=3
q=0

and we have
x(x-1)(x-2) = x^3 - 3x^2 + 2x