A simple way is to suppose that person A has been assigned to Group 1. Note that $3$ of the remaining $11$ will be assigned to Group 1. The probability that person B is one of them is $\frac{3}{11}$. So the probability that A and B end up in different groups is $\frac{8}{11}$.
There are more elaborate combinatorial arguments.
Remark: At the request of OP, here is a more complicated argument. Without changing the probabilities, we may assume that the groups are named groups, say Groups 1, 2, and 3.
The number of (equally likely) ways to assign people to named groups is $\frac{12!}{4!4!4!}$. One way of seeing this is that there are $\binom{12}{4}$ ways to decide who goes into Group 1, and for each of these there are $\binom{8}{4}$ ways to decide who goes into Group 2.
Now we could directly count the number of ways to assign A and B to different groups, or do it indirectly by counting the number of ways to assign A and B to the same group. We do the second.
There are $\binom{3}{1}$ ways to choose the common group. For each of these, there are $\binom{10}{2}$ ways to choose the groupmates of A and B. And there are $\binom{8}{4}$ ways to decide on the members of the first unused group, for a total of $\binom{3}{1}\binom{10}{2}\binom{8}{4}$.
Divide by $\frac{12!}{(4!)^3}$ to find the probability A and B end up in the same group. Fairly quickly, the expression simplifies to $\frac{3}{11}$.
For (a) there are two cases: Jana is at one end, or she isn't.
If she's at the end, pick which end ($2$), then pick which of the eight boys stands next to her ($8$). Then place the other $18$ children ($18!$).
If she's not at the end, pick where she stands ($18$), then pick the boy that stands on her left ($8$) and then on her right ($7$). Then place the other $17$ children ($17!$).
Hence the probability is
$$P_a = \frac{2 \cdot 8 \cdot 18! + 18 \cdot 8 \cdot 7 \cdot 17!}{20!} = \frac{18}{95}.$$
For (b) there are three cases:
- three girls, one boy;
- three boys, one girl;
- two of each.
So in order:
- Pick the three girls ($_{12}C_3$) and the boy ($8$);
- Pick the three boys ($_{8}C_3$) and the girl ($12$);
- Pick the two boys ($_{8}C_2$) and the two girls ($_{12}C_2$).
Hence:
$$P_b = \frac{8 (_{12}C_3) + 12 (_{8}C_3) + (_{12}C_2) (_{8}C_2)}{_{20}C_4}.$$
Best Answer
You can calculate the probability that all girls are in a only group, the probability that four girls are disposed in two groups and then you can use the inverse probability. The probability that all girls are in only group is: $$1\cdot \frac {3}{11}\cdot \frac{2}{10}\cdot {1}{9}$$ while the probability that all girls are disposed in two groups is:$$1\cdot 1\cdot \frac{6}{10}\cdot \frac{5}{9}.$$ Then you can use the inverse probability $$1-(1\cdot \frac{3}{11}\cdot \frac{2}{10}\cdot \frac{1}{9})-(1\cdot 1\cdot \frac{6}{10}\cdot \frac{5}{9}).$$