How many 3-letter words can we make from the letters A, B, C, and D, if we are allowed to repeat letters, and we must use the letter A at least once, and the letter B at least once?
If a word consists of _ _ _ blanks, and A and B must be used once each,
there could be 6 different positions. (AB{}, A{}B, BA{}, B{}A, {}AB, {}BA)
the blank has four different values for each position (A, B, C, or D)
If we multiply the number of postions by what value could be filled in for each postion, we get 4x6=24
There are therefore 24 ways.