Answer
So I understand that you have 9 seats in a row and the seats 1,3, 5, 7 and 9 are for the girls, the seats 2, 4, 6 and 8 are for the boys.
The girls can go on 5! sitting ways, namely a permutation of 5, or a variation of 5 girls 5 chairs. (you know that a variation n from n equals a permutation of n). Girl M1 can choose from 5 chairs, M2 from 4, M3 from 3… This gives 5! = 120 possibilities.
The same goes for the boys, but now there are four of them, so they are at 4! ways to sit. So that’s 24 possibilities.
So in total: 120 x 24 = 2880 possibilities.
Suppose the chairs are in a circle. And suppose that the nine young people sit down correctly, and then they all sit 1 chair further in the same direction. Do you consider that a different settlement or not? If so, then you have to multiply that 2880 by 9 again.
You can easily see that with smaller numbers, take for example 3 girls and 2 boys : if they are in a row then there are 3! x 2! = 12 possibilities. Do they sit in a circle and the chairs are not marked, so only the question of who is sitting next to whom counts, then the same 12 possibilities remain. It doesn’t matter where the first one sits, only the others have to choose the right way. But if the chairs are marked, it does matter where the first one sits, and because he can choose from 5 you will also get 60 possible arrangements, so 5x more than 12.

Answered by
prof.dr. Paul Hellings
Department of Mathematics, Fac. IIW, KU Leuven

Old Market 13 3000 Leuven
https://www.kuleuven.be/
.