I found congruence like below in various note-

$$ 6^x \equiv 16 \pmod{20}$$

$$ 5^z\equiv 5 \pmod{20}$$

For any $z,x$ (perhaps, I didn't see any other condition).

How residues $16, 5$ are found? What is the general method? Plz show example with proof.