In how many ways can three pairs of siblings from different families be seated in two rows of three chairs, if siblings may sit next to each other in the same row, but no child may sit directly in front of their sibling?
Let's label the six children A, B, C, D, E, and F. We can assume that the three pairs of siblings are AB, CD, and EF (without loss of generality).
First, let's consider the ways in which the first row can be filled. We have three choices for the leftmost chair: A, C, or E. Without loss of generality, let's say we choose A. Then, there are two choices for the middle chair: either D or F. Finally, there is only one choice for the rightmost chair, which is either C or E (whichever one was not chosen for the leftmost chair).
So there are 3 × 2 × 1 = 6 ways to fill the first row.
Now, let's consider the second row. We can't put any siblings directly in front of each other, so we have to be a bit more careful. Without loss of generality, let's say we start by putting B in the leftmost chair of the second row. Then, we can't put A in the middle chair directly in front of B, so we have to choose either C or E. Let's say we choose C. Then, we can't put D in the rightmost chair directly in front of C, so we have to put F there.
So the second row must be filled with the children B, C, and F, in that order. There are 3! = 6 ways to do this.
Putting it all together, there are 6 ways to fill the first row and 6 ways to fill the second row, for a total of 6 × 6 = 36 ways to seat the six children as described.