Combination- Counting The number of fruit baskets of size $n$ that can be made out of $k$ types of  fruit is $(n+k-1) C (k-1)$.
Give the formula for the number of ways a basket with $10$ pieces of fruit selected from apples, pears, oranges, and strawberries can be formed if
a) equally many apples and pears are in the basket
b) the number of strawberries is the number of apples plus number of pears.
I am confused about what actually the question demands.  Is there no fruit else apple and pears in part a?
 A: Both questions are distributions with extra conditions. Let us solve them accordingly.
(a) We must use casework to address this. We will take $6$ cases: $0$ each of apples and pears (trivial case), $1$ of each, $2$ of each, and so on until we have $5$ of each (in which case there would be no other fruits). Let $n$ be the number of each. To fill the remaining spots in the basket, we choose among $2$ fruits. Notice that our answer is the summation
$$\sum_{n = 0}^{5} \dbinom{(10 - 2n) + 2 - 1}{1}$$
$$= \sum_{n = 0}^{5} 11 - 2n$$
$$= \boxed{36}.$$
(b) We need to restate the condition in a way that allows us to find an easy count. If we claim $S = A + P,$ then our total fruit count is $S + A + P + O = 2S + O.$ In other words, we can distribute among the strawberries and oranges, then distribute again among the apples and pears. Using basic casework for the first distribution, we see that there are $6$ ways to distribute strawberries and oranges (the number of strawberries must be even). If $n$ denotes the number of strawberries, we can write the number of distributions as
$$\sum_{n = 0}^{5} \dbinom{n + 2 - 1}{1}$$
$$= \sum_{n = 0}^{5} n + 1$$
$$= \boxed{21}.$$
