For A, the key is that a flavor cannot be repeated - this puts us in the standard "combinations" situation - selection of 12 distinct objects (flavors) from a set of 31 - so $\binom{31}{12}$ possible selections.
For B, I believe the answer given has an error - should be $\binom{31+12-1}{12}$ (or, equivalently, $\binom{31+12-1}{30}$)- this is the standard formula for selecting 12 objects from 31 "types" (allowing repetition of types): Selecting $r$ objects from $n$ types with free repetition allowed can be done in $\binom{n+r-1}{n-1} = \binom{n+r-1}{r}$ different ways. The given result seems to have confused $r-1$ with $n-1$
For C, we start with the total number of ways to select with no restrictions (corrected result from B) and subtract number the non-allowed selections - We are not allowed to have all 12 cones of the same flavor, and there are 31 flavors to choose - so there are 31 forbidden selections; thus $\binom{31
+12-1}{12}-31$ allowed selections