President and treasurer must be girls. So you need to choose 2 girls from 10, which can be done in C(10,2) ways = (10*9)/(1*2) = 45 ways. For each of these combinations, there are 2 ways in which the 2 girls can be allotted the 2 posts (e.g. Girl1 can be the Pres and Girl2 the treasurer, and vice versa). Hence possible combinations = 45*2 Similarly, VP and secretary must be boys. So you need to choose 2 boys from 8, which can be done in C(8,2) ways = (8*7)/(1*2) = 28 ways. For each of these combinations, there are 2 ways in which the 2 boys can be allotted the 2 posts (e.g. Boy1 can be the VP and Boy2 the secretary, and vice versa). Hence possible combinations = 28*2 Finally, each set of 2 girls can be paired with each set of 2 boys to form the final set of officers. So the number of possible combinations = 45*2*28*2 =ways. Hope you got it :)