Hey Im having a hard time on how to start with this problem. Any help would be appreciated.

This is actually a 4 part problem.

John has to visit n apartments to get candies frome each. There is no particular order in which he is going to visit those apartments.

A) In how many ways can he visit the n apartments?
This was simple.

Assume that each apartment is going to provide one candy. There are two types of candies. A and B. We know that k <= n apartments bought type A candies. If John is going to eat the candy before visiting the next apartment, in how many ways can he mix up the flavors? Solve this in two ways and explain the detail of each

B) Using part (a) and overcounting.
Got this

C)By modeling the problem as a selection problem
Got this

d)What is a relation between n and k so that jogn will have to eat at least 3 consecutive B candies? Frame your argument as a Pigeon hole principle.

Dont really understand what to do here