i dont understand how to solve this equation so if anyone could help that would be greatly appreaciated

When kx^3 + px^2 -x + 3 is divided by x - 1, the remainder is 4. When kx^3 + px^2 -x + 3 is divided by x- 2, the remainder is 21. What are the values of k and p?