How many $5$-letter "words" can be formed from the letters A through H, without repeating letters or including the subword BAD? Can someone please help me understand this problem?

Consider all 5 letter "words" made from the letters A through H.
(Recall, words are just strings of letters, not necessarily actual English
words.) How many of the words containing no repeats also do not contain the sub-word BAD?

The answer is $(8\times 7\times 6\times 5\times 4) - 3(5\times 4)$, where the first term is the total words with no repeats and the second term is the total "bad" words.
I understand how to get the first term, but I can´t understand how to get all the words with subword "bad".
Please help!

Consider the subword "BAD" as a single entity "X".
Your 5 letter words will then be reduced to a 3 letter word.
There are 3 positions to put "X" in: X * *, * X *, * * X.
As you have already used 3 letters, there are 5 and 4 ways to fill in the first and second * respectively.
This gives the answer $3 \times (5\times 4)$.
