I came across this exam question:
Given that $(x+2)$ and $(x-1)$ are factors of $f(x)$,
a) form a pair of simultaneous equations in $p$ and $q$
b) show that $p=2$ and find the value of $q$
I immediately wrote, $f(x)=(x+2)(x-1)(x+\alpha) = x^3+5x^2+px-q$, expanded it and equated the coefficients. This answers the second part of the question directly, and given $p$ and $q$ I can construct simultaneous equations involving them arbitrarily.
What rule does the a) part of the question expect me use?