In how many ways can $8$ boys $(B_1,B_2,...,B_8)$ and $5$ girls we arranged linearly such that $B_1$ and $B_2$ are NOT together and exactly four girls are together?
I can solve when either of the conditions is imposed, the former would give $13!-2!\cdot12!$ and the latter would be ${5 \choose 4} \cdot 4! \cdot 10! - 5! \cdot 9!$
However I'm not getting how both these conditions together are meant to be evaluated. I thought it won't follow from principle of inclusion, as these are two independent cases.
Answer given is $5! \cdot 8! \cdot 58$
Without inclusion exclusion:
Putting this process together: $$5!\cdot (4\cdot 8!+\binom{9}{2}\cdot 2\cdot (8!-7!2!))=5!\cdot 8!\cdot (4+\binom{9}{2}\cdot 2-9\cdot 2)=5!\cdot 8!\cdot (76-18)$$