Number of $3$-Letter words from the alphabet {A, B, C} that have no $2$ "A's" directly one after the other 
What is the number of $3$-Letter words from the alphabet {A, B, C} that have no $2$ "A's" directly one after the other?

What am I doing wrong? I have the following calculation: 
$(1 \cdot 2 \cdot 3) + (2 \cdot 1 \cdot 2) + (3 \cdot 2 \cdot 1) = 16$. 
In each of the above parenthesis, $1$ stands for "A", and since no two "A's" are allowed one after the other, we multiply $1$ with the only $2$ options left (B and C). $3$ is a free slot in which we can use any letter from our alphabet. 
This calculation is wrong, but I'm not sure why. My textbook gives $22$ as a solution. Where is my mistake? 
 A: Total number of allocations: $3 \times 3 \times 3 = 27$, because you have 3 slots and 3 letters/slot.
Allocations with 'banned' A: 2, $(AAx), (xAA)$. For each such allocation you have 3 choices $(A, B,C)$. Hence , $27- 2 \times 3 = 21$. Now, you have counted $AAA$ twice, add it from the solution: 
$$
27 - 2 \times 3 +1 = 22
$$
A: Another way of solving this problem would be to look at the cases separately. We can at most have 2 "A's".
The possible number of cases with 0 "A's": 2 * 2 * 2 = 8 ( _ _ _ )
The possible number of cases with 1 "A's": 2 * 2 * 3 = 12 (A _ _, _ A _, _ _ A)
The possible number of cases with 2 "A's": 2 ( A _ A )
8 + 12 + 2 = 22
A: Reading the three products you have written, it seems to me that:


*

*your first case is when the first letter is $A$.

*your second case is when the first letter is not $A$ and the second is $A$.

*your third case is something I don't understand. I would assume that it should be the case where the first letter is not $A$ and the second isn't either, but your product $(3\cdot2\cdot 1)$ does not show any such thing.

