$$\large{\displaylines{A_1=\{\underbrace{1,2,3}_{\color{#ff7800}d=3} \} \quad A_2=\{\underbrace{4,5,6}_{\color{#ff7800}d=3} \} \\ \\ |A|=|A_1 \cup A_2|=|A_1|+|A_2| \\ |A|={\color{#ff7800}d}+{\color{#ff7800}d}=6 \\ \\ n=|A|:{\color{#ff7800}d}=2}}$$
Правило комбинаторного деления