OE:
Represent the placement of the containers as a 6x2 table (6 columns, 2 rows)
As tank containers have the most limitations, let us “place” them first. There are two principal ways to place them: T1 and T2.
T1: All the three tank containers will be in the top row. The number of such variants is 3-permutations of 6, or 6x5x4.
T2: Two of them are in one column and the remaining container is in the top row. There are 6 ways to pick the column, 5 ways to place the remaining container in the top row and 3! Permutations to place the three containers in the three chosen spots. Thus, the total number is 6x5x3!.
After the spots for tank containers are chosen, we will count how many ways there are to place the refrigerated containers.
T1(All the three tank containers are in the top row).
t t t _ _ _
_ _ _ _ _ _
Note, it is all the same here, which example of taken spots we pick(marked as t). The reasoning stays the same.
Now, there are two principal ways to place the refrigerated containers: with two such containers in one column (R2) or with all such containers in separate columns(R1).
T1 – R1: The six possible spots are marked by X.
t t t x x x
x x x _ _ _
As in T1, there are 6x5x4 ways to do so (3 permutations of 6).
T1 - R2: There are 3 ways to choose the column. Then there remain 5 possible spots for the third refrigerated container.
t t t x x r
x x x _ _ r
The three chosen spots can be filled in 3! ways. Thus, the total number of R2 is 3x5x3!.
T2 – R1: The five possible spots are marked by X.
t t x x x x
t x _ _ _ _
There are 5x4x3 ways to do so (3 permutations of 5).
T2 – R2: There are 4 ways to choose the column. Then there remain 4 possible spots for the third refrigerated container.
t t x x x r
t x _ _ _ r
The three chosen spots can be filled in 3! Ways. Thus, the total number of this R2 is 4x4x3!.
After we have “placed” the tank and refrigerated containers, the remaining six spots can be filled in 6! Ways (Number of permutations of 6 objects).
The total number of all possible ways to stack the containers is
6! x (T1(R1 + R2) + T2(R1 + T2))
6! x (6 x 5 x 4 (6 x 5 x 4 + 3 x 5 x 3!) + 6 x 5 x 3!(5 x 4 x 3 + 4 x 4 x 3!))
Let us extract 6! = 6 x 5 x 4 x 3 x 2 x 1 from each term within the brackets.
6! x (6! (5 x 4 + 3 x 5) + 6! (5 x 3 + 4 x 3!))
6! x 6! x (20 + 15 + 15 + 24)
6! x 6! x 74
Answer D.