This is a fairly straightforward problem. We can break this problem into $4$ cases: the words that don't contain either of $A, B, C, D$. For example, the words that don't contain $D$ are $AAABC, ABBCC,\ldots$ There are $3 \cdot \binom{5}{1, 2, 2} + 3 \cdot \binom{5}{1, 3, 1} = 150$ of those. In total there are $4 \cdot 150 = 600$ words with the given property.
I am supposed to solve this problem using the formula $N_1 = |X| + |Y| + |Z| - 2|X \cap Y| +3|X \cap Y \cap Z|$. The answer is supposed to be $972 - 384 + 12 = 600.$ I'd like to see how they came up with that. But I am having difficulty defining $X, Y, Z.$ I'd be thankful if someone could explain how they defined these sets.
edit: I guessed the formula from the answer so the actual formula they have used might have been different. I think I made a mistake there.
edit 1: the actual formula might have been either of
$|X| + |Y| + |Z| - 2(|X \cap Y| + |X \cap Z| + |Y \cap Z| + 3(|X \cap Y \cap Z|)$
$|X| + |Y| + |Z| + |W| - 2(|X \cap Y| + |X \cap Z| + |X \cap W| + |Y \cap W| + |Y \cap Z| + |Z \cap W|) + 3(|X \cap Y \cap Z| + |X \cap Y \cap W| + |Y \cap Z \cap W| + |X \cap Z \cap W|) – 4(|X \cap Y \cap Z \cap W|)$
Let $X$ be the set of outcomes in which $A$ is missing.
Let $Y$ be the set of outcomes in which $B$ is missing.
Let $Z$ be the set of outcomes in which $C$ is missing.
Let $W$ be the set of outcomes in which $D$ is missing.
The number of outcomes in which exactly one letter is missing is
$$|X| + |Y| + |Z| + |W| - 2(|X \cap Y| + |X \cap Z| + |X \cap W| + |Y \cap Z| + |Y \cap W| + |Z \cap W|) + 3(|X \cap Y \cap Z| + |X \cap Y \cap W| + |X \cap Z \cap W| + |Y \cap Z \cap W|) - 4(|X \cap Y \cap Z \cap W|)$$
If $A$ is missing, there are $3$ ways each of the five positions can be filled, so $|X| = 3^5 = 243$. By symmetry, $$|X| = |Y| = |Z| = |W| = 243$$
If $A$ and $B$ are missing, there are two ways each of the five positions can be filled, so $|X \cap Y| = 2^5 = 32$. By symmetry, $$|X \cap Y| = |X \cap Z| = |X \cap W| = |Y \cap Z| = |Y \cap W| = |Z \cap W| = 32$$
If $A$, $B$, and $C$ are missing, there is one way each of the five positions can be filled, so $|X \cap Y \cap Z| = 1^5 = 1$. By symmetry, $$|X \cap Y \cap Z| = |X \cap Y \cap W| = |X \cap Z \cap W| = |Y \cap Z \cap W| = 1$$
Since it is not possible for all four letters to be missing, $$|X \cap Y \cap Z \cap W| = 0^5 = 0$$
Hence, the number of outcomes in which exactly one letter is missing is $$4 \cdot 243 - 2 \cdot 6 \cdot 32 + 3 \cdot 4 \cdot 1 = 972 - 384 + 12 = 600$$