2. (15 points) We will call a word any finite sequence of letters of the Russian alphabet. How many different four-letter words can be formed from the letters of the word КАША? And from the letters of the word ХЛЕБ? In your answer, indicate the sum of the found numbers.
Answer: 36.

Solution. In the word ХЛЕБ, all letters are different. Therefore, by rearranging the letters, we get $4 \cdot 3 \cdot 2 \cdot 1=24$ words. From the word КАША, we can form 12 words. Indeed, for the letters K and Ш, there are $4 \cdot 3=12$ positions, and we write the letters А in the remaining places. Thus, in total, we get $24+12=36$ words.