I am not very sure about the methodology. Please let me know if the logic is faulty anywhere.
We have $3$ slots.$$---$$
The middle one has to be a vowel. There are only two ways in which it can be filled: O, A.
Let us put O in the middle.$$-\rm O-$$
Consider the remaining letters: O, A, $\bf P_1$, $\bf P_2$, R, S, L. Since we will be getting repeated words when we use $\bf P_1$ or $\bf P_2$ once in the word, we consider both these letters as a single letter P. So, the letters now are O, A, P, R, S, L. We have to select any two of them (this can be done in $^6C_2$ ways) and arrange them (this can be done in $2!$ ways). So, total such words formed are $(^6C_2)(2!)=30$. Now there will be one word (P O P) where we will need both the P's. So we add that word. Total words=$31$.
Now, we put A in between.$$-\rm A-$$
Again proceeding as above, we have the letters O, P, R, S, L. Total words formed from them are $(^5C_2)(2!)=20$. We add two words (O A O) and (P A P). Thus, total words formed here=$22$
Hence, in all, total words that can be formed are $22+31=53$.
(P.S: Please edit if anything wrong.)
Here is another way - take all three letter words and deduct those containing just vowels or just consonants. This comes to $$8\cdot 7 \cdot 6-5\cdot 4 \cdot 3 - 3\cdot 2 \cdot 1=336-60-6=270$$
If letters are allowed to be repeated the number is $$8^3-5^3-3^3=512-125-27=360$$
Another way of counting is to count the number of possibilities for each pattern of vowels and consonants.
$VVC: 5\times 4 \times 3=60$
$VCV: 5\times 3 \times 4=60$
$VCC: 5\times 3 \times 2=30$
$CCV: 3\times 2\times 5=30$
$CVC: 3\times 5\times 2=30$
$CVV: 3\times 2\times 5=60$
This gives $270$
I've done this longhand for clarity
Best Answer
There are seven distinct letters in the word AGONIZE, of which four are vowels. We must ensure that there are vowels in the middle two positions. Therefore, we will fill the middle two positions first, then fill the first and last positions.
There are four ways to place a vowel in the second position and three ways to place one of the remaining three vowels in the third position. There are five ways to fill the first position with one of the remaining five letters and four ways to fill the last position with one of the remaining four letters. Hence, there are $$4 \cdot 3 \cdot 5 \cdot 4 = 240$$ four-letter code words that can be formed from the letters of the word AGONIZE which have vowels in the middle two positions.
Let's correct your attempt.
Two consonants are used as the outside letters: There are four vowels and three consonants in the word AGONIZE. Thus, there are three ways to fill the first position with a consonant, four ways to fill the second position with a vowel, three ways to fill the third position with one of the remaining vowels, and two ways to fill the fourth position with one of the remaining consonants. Hence, there are $$3 \cdot 4 \cdot 3 \cdot 2 = 72$$ such code words.
We start with a vowel or end with a vowel (but not both): Suppose we start with a vowel. There are four ways to fill the first position with a vowel, three ways to fill the second position with one of the three remaining vowels, two ways to fill the third position with one of the two remaining vowels, and three ways to fill the fourth position with one of the three consonants. Hence, there are $$4 \cdot 3 \cdot 2 \cdot 3 = 72$$ code words which begin with a vowel but do not end with a vowel.
By symmetry, there are also $72$ code words which end with a vowel but do not begin with a vowel (interchange the roles of the first and last positions in the above argument. Thus, there are $2 \cdot 72 = 144$ four-letter code words with exactly three vowels in which the middle two positions are filled with vowels.
Only vowels are used: There are $4! = 24$ ways to fill the four positions with the four distinct vowels in the word AGONIZE.
Total: Since the three cases above are mutually exclusive and exhaustive, the number of admissible code words is $$3 \cdot 4 \cdot 3 \cdot 2 + 2 \cdot 4 \cdot 3 \cdot 2 \cdot 3 + 4! = 72 + 144 + 24 = 240$$ as we found above.