Suppose you want the probability of rolling exactly $5$ of a kind in $9$ normal dice. There are $6$ ways to choose the number on the set, $\binom 95$ to choose the dice which show that number, and $5^4$ ways to choose the results of the other dice, giving a probability of $\frac{6\binom 95 5^4}{6^9}$.
(Here $\binom nr={}^n\mathrm C_r$ is the binomial coefficient.)
Unfortunately it's not that simple in general. What goes wrong if you try the same approach for $4$ of a kind? It looks like there should be $6\binom 945^5$ rolls which work, but here it's possible that the "other" $5$ dice not in the set will give you another set of $4$. If this happens you've counted the same roll twice: a set of $2$s on dice $1,3,4,7$ with the other dice showing $3,5,3,3,3$ is the same as a set of $3$s on dice $2,6,8,9$ with the rest showing $2,2,2,5,2$. So you need to subtract off combinations with two sets of $4$.
In general you need the inclusion-exclusion formula, and you have to keep going until you hit the maximum number of sets you can fit in. So a general formula for the number of ways to make a set of $k$ from $n$ dice with $r$ sides would be:
$$\sum_{i=1}^{\min(r,\lfloor n/k\rfloor)}(-1)^i\frac{n!}{k!^i(n-ik)!}\binom ri(r-i)^{n-ki},$$
and then you divide by $r^k$ to get the probability.
(Here we use the convention that if $r-i=n-ki=0$ then $(r-i)^{n-ki}=1$.)
The $i$th term in the above formula corresponds to counting the number of ways with $i$ sets, not worrying about overcounting (because later terms fix the overcounting). So there are $\binom ri$ ways to choose the numbers on the $i$ sets, $\binom nk$ ways to choose which dice correspond to the lowest numbered set, $\binom{n-k}k$ for the second, and so on (the product of those terms comes out as $\frac{n!}{k!^i(n-ik)!}$), and finally $(r-i)^{n-ki}=1$ possible rolls of the leftover dice, if any.
For a) think about this: how many pairs there are to make a roll of the kind $aaabb$, that is, how many pairs of $ab$? There are $6\cdot 5=30$ kinds of these pairs. However each throw of the kind $aaabb$ can appear in any order (by example as $ababa$ or $abbaa$), that is, for each pair $ab$ there are $\binom52=10$ different ways that a throw can be ordered.
Thus the total probability is $30\cdot10\cdot \frac1{6^5}$
For the part b) it happen similarly: you want to choose $5$ different numbers of $6$, and these numbers can appear in any order, that is, it can appear as $abcde$ or $acdeb$. How many distinct groups of $5$ numbers, taken from $6$ exists? there are $\binom65=6$, and each one can appear in $5!$ different ways, then the probability is $6\cdot 5!\cdot\frac1{6^5}$.
In part b) you have the same result than me but it is not clear if your reasoning is correct or not.
Best Answer
Each die always has value at least $1$, so we may as well ask for the number of ordered sequences $(a_1, \ldots, a_5)$ such that $a_1, \ldots, a_5 \in \{0, \ldots, 5\}$ and $a_1 + \cdots + a_5 = 2$. This is only possible if (1) one of the $a_i$ is $2$ and the others are all $0$, or (2) two of the $a_i$ are $1$ and the others are all $0$. There are only ${5 \choose 1} = 5$ possibilities for the form and ${5 \choose 2} = 10$ possibilities for the latter, and so only $5 + 10 = 15$ ordered sequences satisfying the criteria in total.