Number of ways of arranging 5 boys and 3 girls, i.e. 8 people on a round table would be 7!
We subtract the number of ways of arranging those people when B1 and G1 are always together to get the required answer.
When B1 and G1 are together, we get 4 boys +2 girls + 1(B1 + G1) i.e. 7 people and since B1+G1 can be permuted in 2 ways, these can be arranged in 6! x 2 ways.
Subtracting, we have 7! - 6! x 2 =6!(7−2)
=5×6! ways in total.