If anyone could explain how this is done, it would be very much appreciated!

Fermat’s Little Theorem states that if a is an integer with gcd(a,p) = 1, where p is a prime number, then:

a^(p-1) ≡ 1 mod p

Define e_p(a) to be the smallest number n>0 such that a^n ≡ 1 mod p. Compute e_p(a) for the prime p = 5 and 1≤a≤p-1