Could not understand how to solve it

I got a hint that Fermat’s little theorem be used for it. But could not understand how to use it?

which q are u talking about

u have given reference to quiz

which q do u have doubt about