proof:
Suppose that $3| x^3+2x+1$ and $x$ is a rational number, $\frac{p}{q}$, $gcd(p, q) = 1, q \ne 0$
sub $\frac{p}{q}$ into $x^3+2x+1$:
$\frac{p^3+2pq^2+q^3}{q^3} =3d$ for some integer d
$p^3+2pq^2+q^3 =3dq^3$
this means that,
$3|(p^3+2pq^2+q^3)$
I got stuck from this point onwards and could not find a contradiction, any hints on how should I proceed with the proof?