I have obtained three points where it cuts the $x$-axis because I followed the process for quadratic equations,not cubic. Could someone explain it in detail?
Thanks to everyone who takes the time to answer.
By a good look ,find out that
$$x=-1 \to f(-1)=0\\x=2 \to f(2)=0$$ so you can divide $x^3-5x^2+2x+8 $ to $x+1$ or $x-2$ then you will have :$$f(x)=(x+1)(x-2)(x-4) $$ so $x=-1,2,4$ cuts $x$-axis
and when you put $x=0 \to f(0)=+8$ so $y$-axis cuts in $(0,8)$