Hi Narchitect, some more info regarding this problem would be useful.
Is there a maximum value for k ?
What do the 7 green boxes and 3 red boxes have to do with it ? That doesn't seem to affect the problem at all, that is, 10 boxes all of the same colour would appear to produce the same problem.
Getting the answer 220 for k=3 is easy enough and that seems to give some insight into how to proceed. However, it opens up questions such as, suppose, for example, k=9, then we could put 2 b***s in one box and the other 7 in 7 separate boxes, or we could have two boxes each containing 2 b***s with the other 5 in separate boxes, or three boxes each containing two b***s or 4 boxes each containing 2 b***s or one or two or three boxes each containing 3 b***s or ..... , 1 or 2 boxes each containing 4 b***s, and so on. Is there a function, or does there exist a function that will cover all of those possibilities ? What sort of function have you been trying ? Would a piece of computer code (an algoritm) be allowable as a function ?