This congruence can be rewritten as:

One way is to try all possibilities: .

Another possibility is to notice that this is equivalent to two congruences

and verify the validity of them.

You can notice that one of them is exactly Fermat's little theorem for exponent 3.

I do not think that the original congruence can be obtained directly from Euler's theorem, but it might be useful for you to notice, that Euler's theorem implies this congruence for all n coprime to 6.