Answer:
20
Explanation:
To abbreviate, I will refer to each person by their initials (A,B,C,D).
We will count all the possibilities depending on C and completing each case.
C can sit on the blue, red or green tables. Suppose that C sits on the blue table. Now, A can sit on the yellow or orange tables, then there are 2 possibilities to sit A. After choosing, there remains only one choice for B, either the yellow or orange table, the one which A didn't sit.
Now, the blue, yellow and orange tables are occupied, so D can sit on the red or green tables. Hence, we have 2 choices for D. In total, we have 2×2=4 ways to sit everyone if we choose blue for C.
Suppose that C sits on the green or red tables (2 choices). Now, we split this in two cases.
If we use the yellow and blue tables for A and B, there are 2 ways of seating them (A to yellow, B to blue, or A to blue, B to yellow). For D, we have 2 choices, the red/green table (depending on C) and the orange table. Thus, in this case, we have 2×2×2=8 ways of seat the guests.
If we don't use precisely the yellow and blue tables for A and B, one of them must sit at the orange table. There are 2 ways of doing this (A in orange or B in orange). The other must sit on the blue or yellow tables (2 choices). Finally, D has only 1 choice, the table not used by C. Then we have 2×2×2=8 ways of doing this.
Therefore, considering all the cases we have 4+8+8=20 ways of seating the guests.