<s>[INST] How many ways are there to purchase $24$ croissants which come in packages of sizes $3$ and $6$? A croissant shop has $8$ different types of croissants that come in packages of size $3$.  Additionally, there are $5$ different types of gluten-free croissants available that only come in packages of size $6$.  You want to buy exactly $24$ croissants and do not buy any duplicates of any package.  How many different ways are there to purchase croissants?
I was thinking of counting the number of ways you could buy packages of $6$ (without duplication) from $0$ packages to $4$ packages, and filling the rest with different packages of $3$ until we reach $24$ croissants.  Then, I would add these together.
$0$ packages of $6 + 8$ packages of $3$ $${8 \choose 3} $$
$1$ packages of $6 + 6$ packages of $3$ $${6\choose 1} \cdot {8\choose6}$$
$2$ packages of $6 + 4$ packages of $3$ $${6\choose 2} \cdot {8\choose4}$$
$3$ packages of $6 + 2$ packages of $3$ $${6\choose 3} \cdot {8\choose2}$$
$4$ packages of $6 + 0$ packages of $3$ $${6\choose 4} \cdot {8\choose4}$$
number of different ways  = $${8 \choose 3} + {6\choose 1}{8\choose6} + {6\choose 2}{8\choose4} + {6\choose 3}{8\choose2} + {6\choose 4}{8\choose4}$$
I'm not sure if this is the correct approach or not.
 [/INST] The cases you considered are correct.  However, you seem to be confusing the number of packages with their size.  There are eight packages which contain three croissants each and five packages which contain six gluten-free croissants each.
Since each selected package must be different, if $k$ distinct packages of six gluten-free croissants are purchased, then
$$\frac{24 - 6k}{3} = 8 - 2k$$
distinct packages of three croissants must be selected.  The number of ways of selecting exactly $k$ of the five packages of six gluten-free croissants and $8 - 2k$ of the eight packages of three croissants is
$$\binom{5}{k}\binom{8}{8 - 2k}$$
Since a total of $24$ croissants are purchased, $0 \leq k \leq 4$.  Hence, the number of admissible ways to purchase $24$ croissants is
$$\sum_{k = 0}^{4} \binom{5}{k}\binom{8}{8 - 2k} = \binom{5}{0}\binom{8}{8} + \binom{5}{1}\binom{8}{6} + \binom{5}{2}\binom{8}{4} + \binom{5}{3}\binom{8}{2} + \binom{5}{4}\binom{8}{0}$$
</s>