3 boys $B_i ,\ i = 1, 2, 3$ and 6 girls $G_i, \ i = 1, 2, \ldots, 6$ are to be seated in a row. Number of ways they can be seated so that $B_1$ and $B_2$ are separated and $G_1$ and $G_2$ are also separated equal to?
I used the following approach:
Total no of ways - (No of ways $G_1$ , $G_2$ and $B_1$ , $B_2$ are together + No of ways $B_1$ , $B_2$ are together + No of ways $G_1$ , $G_2$ are together)
Which equals: 9! - (7!*2 *2 + 8!*2 + 8!*2)
Let $M$ be the event that number of ways $A_1$ and $A_2$ are together and $N$ be the event that number of ways $B_1$ and $B_2$ are together. Also, let $n(K)$ be the number of ways event $K$ can occur. Apply inclusion-exclusion principle to get, \begin{align*} \text{Required answer}&=9!-n(M\cup N)\\ &=9!-n(M)-n(N)+n(M\cap N)\\ &=9!-(2\times8!)-(2\times8!)+(4\times 7!)&&(\text{Using tie method})\\ &=7!(72-16-16+4)\\ &=\boxed{44\times7!} \end{align*}