HH.2 Three pieces among red, blue, and black

How many ways are there by taking out three balls out of two red balls, two blue balls, and five black balls and lining up them in a row ?








Answer
25 ways

Solution
If there are three red balls and three blue balls, you can pick up one of three balls as a first ball and also three ways as both of a second and third ball. 
In that case, there are 3 × 3 × 3 = 27 ways in all. 

Since there are actually two red balls and two black balls, you can not arrange two patterns of "red-red-red" and "blue-blue-blue". 

Therefore there are 27 - 2 = 25 ways.