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.
You look for patterns:
Of course, this can proved by induction. You have $6^2\equiv16\pmod{20}$. Now, take $n\in\mathbb N$ and assume that $6^n\equiv16\pmod{20}$. Then$$6^{n+1}=6^n\times6\equiv16\times6\equiv16\pmod{20}.$$You can apply the same method to the second assertion.