The idea behind that proof is that
$$0=a_i^2-a_j^2 =(a_i-a_j)(a_i+a_j) \pmod{10}$$
Then at least one of $(a_i-a_j),(a_i+a_j)$ is divisible by $2$ and at least one is divisible by $5$. Now show that $(a_i-a_j)$ and $(a_i+a_j) $ have the same parity.
Your idea also works:
Split the seven numbers among the following $6$ boxes:
$$\{ 1,9 \pmod{10} \} ; \{ 2,8 \pmod{10} \} ; \{ 3,7 \pmod{10} \} \\ \{ 4,6 \pmod{10} \} ; \{ 5 \pmod{10} \} ; \{ 0 \pmod{10} \}$$
Then at least one box contains two numbers. If the two numbers in the same box are congruent $\pmod{10}$, then their difference is divisible by $10$. Otherwise, their sum is divisible by 10.
Rearrange the integers from $1$ to $4n$ into
$$\begin{equation}\begin{aligned}
\{& (1,j+1), (2, j + 2), (3, j + 3), \, \ldots \, , (j, 2j), \\
& (2j + 1, 3j + 1), (2j + 2, 3j + 2), \, \ldots \, , (3j, 4j), \\
& \vdots \\
& (4n - 2j + 1, 4n - j + 1), (4n - 2j + 2, 4n - j + 2), \, \ldots \, , (4n - j, 4n) \}
\end{aligned}\end{equation}\tag{1}\label{eq1A}$$
Note each member of the set above is a pair of integers with a difference of $j$. Also, since $j \mid 2n \implies 2j \mid 4n$, all of the integers from $1$ to $4n$ are in this set exactly once each. Finally, this gives that the number of elements of the set is the $4n$ integers divided by the $2$ integers in each pair, i.e., $\frac{4n}{2} = 2n$. Alternatively, you also can get the number of elements by multiplying the number of columns times the number of rows, i.e.,
$$j \times \left(\frac{4n-2j}{2j} + 1 \right) = j \times \left(\frac{2n}j - 1 + 1\right) = 2n \tag{2}\label{eq2A}$$
Thus, by the Pigeonhole principle, choosing $2n + 1$ integers between $1$ and $4n$ means that both of the integers from at least one of the element pairs in \eqref{eq1A} must be chosen, with these $2$ integers therefore having a difference of $j$.
Best Answer
We consider the set $\{ 5^n: n\in \{1,...,2022\} \}$, by the pigeonhole principle, there exist $m,n\in \{1,...,2022\}$ such that $5^n\equiv 5^m \ (\text{mod} \ 2021)$ and then $5^m-5^n$ is a multiple of 2021.