This is a weighted average problem: in the question, we have two groups, boys and girls, and the question talks about the average ages of each group, and the average age of all of the children combined.
In general, in any weighted average problem, the average you get when you combine the groups will always be closer to the average of the larger group. For example, if you have men earning $40 per hour, and women earning $50 per hour at a company, then if there are more women than men at the company, the overall average wage will be closer to $50 than to $40 (so will be greater than $45). But here, we learn that the overall average age is exactly equal to the average of the average age of the boys and the average age of the girls, or in other words, it is exactly midway between them. That can only happen in one of two ways: either we have exactly equal numbers of boys and of girls, or the average age of the boys is identical to the average age of the girls. Since the question tells us the number of boys is different from the number of girls, then their average ages must be identical, and if they sum to 10, each group has an average age of 5.
_________________
GMAT Tutor in Toronto
If you are looking for online GMAT math tutoring, or if you are interested in buying my advanced Quant books and problem sets, please contact me at ianstewartgmat at gmail.com