The simple way is to write down all the possibilities and count them up, just like you did in the question to the answer should be 4. But this would be quite difficult if we had e.g. 150 chairs.
Also, 4 is the correct answer only if we can't distinguish one boy from another and those two girls in our eyes are all the same. In this case we have 3 indistinguishable object of type B and two of type G but those have to always be side-by-side so we can think of them being just one single item. So we can arrange those 4 items in
Now, I'm assuming that we have to count the arrangements of 5 different people: B1, B2, B3, G1, G2. Firstly, like before girls sit together so we think of 4 people: B1, B2, B3, G -
All of what I've done above was under the assumption that the order of chairs is important (you can think of it as if the chairs had numbers of them). So arrangements '12345' and '54321' are two different ones. If we didn't care about it, so if we'd only be interested who sits besides who, any final answer of those should be divided by
Visualisel the process happening ... then think about the maths involved.
I would understand this question differently - there is a difference in the way the two girl and the 3 boys sit. Jane, then Ann, is different from Ann then Jane. Similarly for the boys.
There are 4 different places in which the girls can sit together.
GGbbb or bGGbb or bbGGb or bbbGG.
However in each case it could be Gg or gG.
This is then 8 different arrangements for the girls.
Once the girls are seated, there will be 3 seats open.
There is a choice of 3 boys for the first seat, 2 boys for the second seat and the third boy has to sit in the remaining seat.
This leads to