This is a trial problem where you have to guess and check.
An easy way is to split 321 the closest to a half which can be 161 or 160
If we add 5 to one one (166) is it 5 more than the other? (321 - 166 = 155) So, no.
Let's make the number 163. Is it 5 more than the other? (321 - 163 = 158)
They are 5 away from each other which means we can use 163 for the amount of girls
There are 163 girls