A. How many ternary strings of length $6$ contain exactly two $0$s.
B. How many ternary strings of length $6$ contain at least one 0.
For A I think it's $\frac{6!}{(6-2)!}*2^4$ because the first part would be choosing $2$ $0$s and the second part filling the rest of the $4$ slots with either only $1$s or $2$s and then for part B I got $\binom{6}{1}\frac{6!}{(6-1)!1!}$ because choosing $1$ zero would give you at least one zero?
For A you choose the positions for the zeroes in $\binom{6}{2}$ ways and then for each of the remaining 4 spots we have 2 choices (either one or two). Hence the number of ways is $\binom{6}{2}\times 2^4$.
For B it is easiest to consider the set of length 6 ternary strings without a zero (this is the complement). There are $2^6$ such strings (each position is either a one or a two). There are $3^6$ ternary strings strings of length 6 (we have three choices for each position). Hence there are $3^6-2^6$ ternary strings of length $6$ with at least one zero.