I just redid part B my own way and it agrees with CPhil's answer ... but his is much easier.
Anyway, here is my logic
(b) I also bought 7 different postcards. How many ways can I send the postcards to my 3 friends, so that each friend gets at least one postcard?
The original answer was 15, that was if all the cards were the same.
possible numbers of bags each (total 7) | |||||
5 | 1 | 1 | 3 ways if all the same | 7*6=42 | 3*42=126 |
4 | 2 | 1 | 6 ways if all the same | 7*6C2=105 | 6*105=630 |
3 | 3 | 1 | 3 ways if all the same | 7*6C3=140 | 3*140=420 |
3 | 2 | 2 | 3 ways if all the same | 7C2*5C2=210 | 3*210=630 |
Total | 15 ways if all the same | 1806 ways if all are different |
So my answer agrees with CPhill's 1806 ways