By little Fermat (or directly) note $\,{\rm mod}\ 3\!:\ x^3\equiv x\,$ for all integers $\,x,\,$ thus $\,x^3\equiv y\iff x\equiv y.\,$ Thus your relation is the same as the standard congruence relation '$\equiv$', which is transitive since
$\quad x\equiv y,\ y\equiv z\pmod 3\,\Rightarrow\, 3\mid x\!-\!y,y\!-\!x\,\Rightarrow\, 3\mid x\!-\!y+y\!-\!z = x\!-\!z\,\Rightarrow\,x\equiv z\pmod 3$
Remark $\ $ Note that the inference in the first line already uses the fact that '$\equiv$' is an equivalence relation (transitive, etc). Thus if you don't already know that, then you will need to prove that too (if so, be careful to prove things in the correct order to avoid a circular proof).