Question: how many ways are there to distribute 10white and 10black balls into 20 distinct boxes so that at most one box is empty.


I understand case-1. But I cannot understand a part of answer of case-2.
The answer of case-2 is $\binom{20}{1}\binom{19}{1}[\binom{18}{8}+\binom{18}{8}+\binom{18}{9}]$
$\binom{20}{1} \rightarrow$ choose one empty box.
$\binom{19}{1}\rightarrow$ choose one box containing 2balls.
But how to write $[\binom{18}{8}+\binom{18}{8}+\binom{18}{9}]$? Please explain the part. Thank you:)
There is one empty box, and therefore a box that contains two balls. The unlucky box can be chosen in $\binom{20}{1}$ ways, and for each choice the lucky box can be chosen in $\binom{19}{1}$ ways.
Suppose now that we have chosen the empty box and the lucky box. There are $3$ cases: (i) the lucky box contains two whites; (ii) the lucky box contains two blacks; (iii) the lucky box gets a black and a white.
For Case (i), we choose $8$ boxes from the remaining $18$ to get the remaining $8$ whites. This can be done in $\binom{18}{8}$ ways.
Obviously Case (ii) has the same number of possibilities as Case (i).
For Case (iii), we need to choose $9$ places from the remaining $18$ for the whites.