It doesn't actually matter that $p$ is a polynomial -- it is enough that it is a differentiable function. Then assuming $p(x_0)=0$, then $|p(x)|$ is differentiable at $x_0$ if and only if $p'(x_0)=0$.
The easy direction is the one where we know that $p'(x_0)=0$. Then the difference quotients for $|p(x)|$ around $x_0$ are just $\pm$ the difference quotients of $p(x)$ and if one set of quotients tend towards zero, then obviously the other set does too.
On the other hand, if $p'(x_0)=a>0$, then there are points immediately to the right of $x_0$ with difference quotients close to $a$ and points immediately to the left of $x_0$ with difference quotients close to $-a$. Since $a\ne -a$, the difference quotients cannot tend to a limit, so $|p(x)|$ is not differentiable.
For $p'(x_0)<0$ it's the same as in the previous case, with the roles of $a$ and $-a$ swapped.
(Beware that some more explicit reasoning about the various limits will be probably be necessary to make this into an acceptable homework answer).