The question is as follows: Split 10 Cs, 7 Gs, 6 Ls and 3 Ks between 4 boxes. Each box should get at least one thing. The solution is below:
$$ \binom{13}{3} \binom{10}{3}\binom{9}{3}\binom{6}{3}-4\cdot\binom{12} {2}\binom{9}{2}\binom{8}{2}\binom{5}{2}+6\cdot 11 \cdot 8\cdot7\cdot4-4$$
I don't understand it. The first part is the total number of ways to split the things no matter whether the boxes are empty or not. The second part is what? The third? Fourth?
The second term is a first approximation to the number of arrangements with at least one empty box, the third (over)corrects for overcounting the arrangements with at least two empty boxes, and the last is the number with three empty boxes, compensating for the overcorrection; this is an application of the inclusion-exclusion principle.