With A + B + B there will be two other letters chosen from the remaining 3. So we have two processes:
- Choose 2 out of 3 remaining letters. This can be done in ways.
- Arrange the 5 letters, which include a repeated B. This can be done in ways.
So A + B + B can be done in ways.
Similarly A + A + B can be done in ways.
And then in a similar way A + A + B + B + one other letter can be chosen and arranged in ways.
Therefore the total no of 'words' .