Answer
$p(x)=x^4+x^3-3x^2-x+2$
Work Step by Step
The graph intercepts the x-axis at $x=-2$ and $-1$ and is tangent to the x-axis at $x=1$.
It means that:
(i) -2 and -1 are the zeros with odd multiplicities, and
(ii) 1 is the zero with even multiplicity.
Since the polynomial has a degree of 4, the zeros of -2 and -1 has a multiplicity of 1 and the zero of 1 has a multiplicity of 2.
Then,
$p(x)=A(x+2)(x+1)(x-1)^2$
$p(x)=A(x^2+3x+2)(x^2-2x+1)$
$p(x)=A(x^4+x^3-3x^2-x+2)$
$p(x)=Ax^4+Ax^3-3Ax^2-Ax+2A$
The graph also intercepts the y-axis at $y=2$, then the constant term is $2$.
It must be $2A=2\to A=1$.
Therefore, $p(x)=x^4+x^3-3x^2-x+2$.