Example 8 Let $A=\{1,2,3,4,5,6\}, B=\{7,8,9, \cdots, n\}$, choose 3 numbers from $A$ and 2 numbers from $B$ to form a set $A_{i}(i=1,2,3, \cdots, 20)$ containing 5 elements, such that $\left|A_{i} \cap A_{j}\right| \leqslant 2,1 \leqslant i<j \leqslant 20$. Find the minimum value of $n$.
(2002 IMO China National Training Team Selection Examination Problem)
We first prove: Each element in $B$ appears at most 4 times in the subsets $A_{i}(i=1,2, \cdots, 20)$. If not, assume that some element $x$ in $B$ appears $k \geqslant 5$ times in the subsets $A_{i}\{i=1,2, \cdots, 20\}$. Consider the $k$ subsets containing $x$, they contain a total of $3 k \geqslant 15$ elements from $A$. By the pigeonhole principle, there is at least one element in $A$, say $y$, that appears at least $\left[\frac{15-1}{6}\right]+1=3$ times in these $k$ subsets. Let the 3 subsets that contain both $x$ and $y$ be $A_{r}, A_{s}, A_{t}(1 \leqslant r<s<t \leqslant 20)$. Then, the 5 elements in $A \backslash\{y\}$ appear $2 \times 3=6$ times in $A_{r}, A_{s}, A_{t}$. Therefore, there must be an element $z$ that appears 2 times, leading to two subsets that contain $x, y, z$, which contradicts the given condition $\left|A_{i} \cap A_{j}\right| \leqslant 2(1 \leqslant i<j \leqslant 20)$.

From the above proof, we know that each element in $B$ appears at most 4 times in $A_{1}, A_{2}, \cdots, A_{20}$. The total number of appearances of elements in $B$ in $A_{1}, A_{2}, \cdots, A_{20}$ is $2 \times 20=40$, so $|B| \geqslant \frac{40}{4}=10$, and thus, $n \geqslant 10+6=16$.
Furthermore, when $n=16$, there exist 20 sets that satisfy the conditions: $A_{1}=\{1,2,3,7,8\}, A_{2}=\{1,2,4,12$,
$$
\begin{array}{l}
14\}, A_{3}=\{1,2,5,15,16\}, A_{4}=\{1,2,6,9,10\}, A_{5}=\{1,3,4,10,11\}, A_{6}=\{1,3,5,13,14\}, \\
A_{7}=\{1,3,6,12,15\}, A_{8}=\{1,4,5,7,9\}, A_{9}=\{1,4,6,13,16\}, A_{10}=\{1,5,6,8,11\}, A_{11}= \\
\{2,3,4,13,15\}, A_{12}=\{2,3,5,9,11\}, A_{13}=\{2,3,6,14,16\}, A_{14}=\{2,4,5,8,10\}, A_{15}=\{2, \\
4,6,7,11\}, A_{16}=\{2,5,6,12,13\}, A_{17}=\{3,4,5,12,16\}, A_{18}=\{3,4,6,8,9\}, A_{19}=\{3,5,6, \\
7,10\}, A_{20}=\{4,5,6,14,15\} .
\end{array}
$$

In summary, the minimum value of $n$ is 16.