Let us first show that if gcd(a,p)=1 then gcd(a+1,p)=1. Meaning, we want to show that the order modulo p is defined (because if gcd(a+1,p)=p then the order is not defined!)
Say, it is not, gcd(a+1,p)=1 that is a+1=pn. Hence, a=pn-1.
But then a = pn -1 = -1 (mod p) meaning the order is 2 not 3, a contradiction.
Thus, this problem does not lead to an undefined operation.
Now we can solve this problem, gaze below.