Unable to find the f(x) 
Find the Cubic in $x$ which vanishes when $x=1$ and $x=-2$ and has values $4$ and $8$ when $x=-1$ and $x=2$ resprectively.

I have proceeded like $P(x)=(x-1)(x+2)f(x)$ but I unable to find $f(x)$ to satisfy for $x=-1,2$.
 A: You may apply the work you've already done to reduce this to a simple system of equations.
It is definitely true that $P(x) = (x - 1)(x + 2)f(x)$, where $f(x) = (ax + b)$ is linear (with $a \neq 0$). Now, the two additional constraints give you equations in $a$ and $b$. In particular, you have the equations:
$$
P(-1) = 4 = (-2)(1)f(-1) = -2(b - a)
$$
and
$$
P(2) = 8 = (7)(10)f(2) = 70(2a + b)
$$
Now you have two equations in two variables and should be able to complete the problem from here.
A: We have that $P(x) =(x-1)(x+2)f(x)$, just as you said. 
However, notice that since we are looking for a cubic polynomial, f(x) must be a monomial in $x$, so we have $P(x)=a(x-1)(x+2)(x-b)$ for some $a,b$. Now plug $-1,2$ in for $x$ to solve for $a,b$. 
A: Since, cubic polynomial vanishes at $x=1$ & $x=-2$ hence, $(x-1)$ & $(x+2)$ are the factors.
Now, let the third root be $\beta$ then the cubic polynomial is given as $$f(x)=\alpha(x-\beta)(x-1)(x+2)$$ Now, we have 
$$f(-1)=\alpha(-1-\beta)(-1-1)(-1+2)=4$$ $$\implies \alpha(1+\beta)=\frac{4}{2}=2$$ $$\alpha+\alpha\beta=2\tag 1$$
$$f(2)=\alpha(2-\beta)(2-1)(2+2)=8$$ $$\implies \alpha(1+\beta)=\frac{8}{4}=2$$
$$2\alpha-\alpha\beta=2\tag 2$$ Now, adding (1) & (2), we get 
$$\alpha+2\alpha=4\implies \alpha=\frac{4}{3}$$ Substituting the value of $\alpha$ in (1), we get $$\beta=\frac{2}{\frac{4}{3}}-1=\frac{1}{2}$$ Now, substitute these values in cubic polynomial, we get $$f(x)=\frac{4}{3}\left(x-\frac{1}{2}\right)(x-1)(x+2)$$ $$=\frac{2}{3}\left(2x-1\right)(x-1)(x+2)$$ $$=\frac{2}{3}(2x^3+x^2-5x+2)$$ $$\bbox[5px, border:2px solid #C0A000]{\color{red}{f(x)=\frac{2}{3}(2x^3+x^2-5x+2)}}$$
