<s>[INST] determining order of $x+1$ given the $x$ has order three I was trying to expand $(x+1)^n$, then plug $x^3$ in to the expansion of the $(x+1)^n$, keep trying it until I get the order, are there any other ways?
So if $x^3\equiv 1\pmod y$, how would I determine order of $x+1$? 
Can I brute force $x$ and $y$ for the condition then just find $x+1\equiv\pmod y$?
$y$ is prime 
 [/INST] Clearly $x\neq1$ and hence
$$
x^3 \equiv 1 \Rightarrow x^2+x+1 \equiv 0 \tag1$$
Now consider
$(x+1)^6$ and show that
$$
(x+1)^6 - 1 \equiv x\,\left(x+2\right)\,\left(x^2+x+1\right)\,\left(x^2+3\,x+3\right)\tag2$$
and conclude that the order is $6$ by showing no smaller power works.
Added in response to comments
Using (1) in (2) we have 
$$(x+1)^6 \equiv 1$$
Hence order of $x+1$ must divide $6$. 


*

*If $x+1$ has order 1 then $x=0$ which is not possible. So the order cannot be 1.

*if $x+1$ has order 2, then from (1) $x+1 \equiv -x^2$, and hence $(x+1)^2 \equiv x^4$ and $x^4 \not \equiv 1$. So the order cannot be 2.

*if $x+1$ has order 3, then from (1) $x+1 \equiv -x^2$, and hence $(x+1)^3 \equiv -x^6 = -1$. This requires $1 \equiv -1$, which means there are only two elements in the multiplicative group but we know that $1$, $x$ and $x^2$ are distinct since order of $x$ is 3. So the order cannot be 3.
Hence the order has to be $6$
</s>