Answer
Here is a short way.
Fermat’s little theorem says that if p is a prime and b an integer that is not divisible by p, then,
b^(p – 1) = 1 ( mod p ).
In our case, p=7 and b=3. Thus,
3^6 = 1 ( mod 7 )
Multiply both sides by ‘3’ to obtain,
3^7 = 3 ( mod 7)
Done.