Arrange the people in order of height. Ask the shortest person what month she was born in. Whatever she says, there are $12^5$ ways the string of birthmonths, from next shortest to tallest, can be completed.
We now count the "favourables." There are $11$ choices for the other month. And for each choice of other month, there are $2^5-1$ ways the string of birthmonths can be completed to yield a favourable, for not everybody can choose the same month as the shortest person. This gives a total of $(11)(31)=341$ favourables.
Thus the required probability is $\frac{341}{12^5}$. Note that this is different in the denominator from the answer mentioned in the post.
Here's one way to get that figure.
To identify one of the ways the $30$ people can have birthdays satisfying the question's conditions, out of the $12^{30}$ possible ways the $30$ people can have their birthdays distributed among the $12$ months,
it is not enough to identify which of the months have two birthdays and which have three.
It also matters which two people have birthdays in the first two-birthday month, which have birthdays in the second, and so forth.
If we were to enumerate all those possible combinations, we would have
$\binom{30}{2}$ ways to choose who is born in the first two-birthday month.
That leaves $28$ people yet to be assigned, and $\binom{28}{2}$ ways to choose who is born in the second two-birthday month.
Note that
$$\binom{30}{2} \binom{28}{2} = \frac{30!}{2!28!} \frac{28!}{2!26!}
= \frac{30!}{2! 2! 26!}.$$
So we get some cancellation when we expand the binomial coefficients to factorials.
The next factor, $\binom{26}{2},$ will cancel the $26!$ in the denominator, and so forth, and in the end (after running through all the two-birthday months and three-birthday months) you have
$$ \frac{30!}{2! 2! 2! 2! 2! 2! 3! 3! 3! 3! 3! 3!} = \frac{30!}{2^6 6^6}.$$
Alternatively, using multinomials, the number of ways to distribute $30$ distinguishable people into a sequence of six groups of two and six groups of three
(the groups all having unique identities, in this case month names, but the sequence of individuals within a group not being considered), is
$$ \binom{30}{2\ 2\ 2\ 2\ 2\ 2\ 3\ 3\ 3\ 3\ 3\ 3}
=\frac{30!}{2! 2! 2! 2! 2! 2! 3! 3! 3! 3! 3! 3!},$$
same as before.
(In fact I would take the previous argument as an intuition for the multinomial formula, though further proof is required to make the formula general.)
A slightly faster way to get the result if you're not already familiar with multinomials:
to distribute the $30$ birthdays among the twelve months,
we line the $30$ people up in a row according to the order of their birthdays.
This gives $30!$ ways to distribute the birthdays, but since we did not respect the order of birth within the month when we came up with the $12^{30}$-element sample space,
we have overcounted each actual element of the sample space by a factor of $2!$ for each two-birthday month (since we separately counted both ways those birthdays could occur) and a factor of $3!$ for each three-birthday month,
so we have to divide by $2!$ six times and by $3!$ six times to get back to the correct number.
This is similar to an argument you could have made for "$n$ choose $k$" formula,
except that we have more than two groups into which we are partitioning the $n$ items.
Best Answer
Line up the students in order of Student Number. For each of them, write down the birth month. Under our assumption, there are $12^{30}$ equally likely sequences.
Now we count the sequences that satisfy our condition. There are $\binom{12}{6}$ ways to choose the months that have $2$ birthdays.
For definiteness concentrate on the choice January through June. There are $\binom{30}{12}$ ways to choose the students who will have birthdays in this set of months, and there are then $\frac{12!}{2^6}$ ways to assign them to the individual months. And for each of these ways, there are $\frac{18!}{(3!)^6}$ ways to choose the students who will have birthdays in the various remaining months.
It remains to put the pieces together.
Remark: Your analysis is along the right lines. One thing that is missing is the term $\binom{12}{6}$ representing the choice of months that will have two birthdays. But apart from that slip your analysis is more efficient than mine.