You failed to tell us if the boxes are all different.

So we assume they are.

There are ways to place K identical items into N different cell.

If we require that no cell is empty then it must be that case that and that multi-selection formula becomes

.

For part b), we need to count the number of surjections (onto functions) from a set of N+x to a set of N.

If and then the number of surjections from a set of K to a set of N is .