You're probably supposed to find the value of p and not x, which is impossible to do.
Expanding gives
[tex](2x+1)(x^2+px+4)=2x^3+(1+2p)x^2+(8+p)x+4[/tex]
We're told that
[tex]8+p=2(1+2p)[/tex]
which we can use to solve for p:
[tex]8+p=2+4p[/tex]
[tex]6=3p[/tex]
[tex]\boxed{p=2}[/tex]