Count the number of ways you can assign test to the people and then divide by the total number of ways (which is 4^5).
There are 4 ways to choose which test is going to be done by two given applicants who take the same test. There are Binomial[5,2] ways to choose these two applicants.
The remaining 3 applicants must be assigned any one of the 3 other tests. There are 3^3 ways for this.
Now,
4*Binomial[5,2]*3^3
is not the correct answer, because of the double counting of the cases where 2 out of 3 of the remaining group of 3 are also assigned the same test.
Depending on how the question is to be interpreted, such cases should not be counted at all, or they should be counteed once. So, you need to compute the number of these cases and then subtract that once or twice from the above expression.
You can also try a more formal approach using the principle of inclusion and exclusion.
Four different written driving tests are administered by the Motor Vehicle Department. One of these four tests is selected at random for each applicant for a driver's license.
If a group of 5 applicants (consisting of 2 women and 3 men) apply for a license, what is the probability that...
a) Exactly 2 of the 5 applicants take the same test?
b) The 2 women take the same test?
3 answers
a 15/256, b 1/6
4 and5