20 = 2 x 2 x 5
15 = 3 x 5
common divisor (CD) of 20 and 15 is 5 so n should be 5 and each group has 4 boys and 3 girls.
If there are more than one CD, then there are more than one answer.
If they ask for the largest number of groups, greatest common divisor (GCD) will be the answer.