Question 366816
The partitioning can only take place in two ways: either 2,2,4 or 3,3,2.
For the first case, there are C(8,4)*C(4,2)*C(2,2) = 420 ways of partitioning 8 men in two groups of two and 1 group of 4.  After partitioning the 3 groups can be assigned in 3! = 6 ways.  Therefore there are 420*6 = 2,520 ways.
Similarly  there are C(8,3)*C(5,3)*C(2,2) = 560 ways of partitioning 8 men in two groups of 3 and 1 group of 2, and 6 ways of assigning them to the different buildings. Therefore there are 560*6 = 3,360 ways.
Finally since the two cases are mutually exclusive, there are a total of 2,520 + 3,360 = 5,880 ways.