1. **State the problem:**
There are initially more boys than girls in a hall. Specifically, there are 5 more boys than girls.
2. **Define variables:**
Let the number of girls be $g$.
Then the number of boys is $g + 5$.
3. **After some leave:**
$\frac{2}{5}$ of the girls leave, so girls remaining = $g - \frac{2}{5}g = \frac{3}{5}g$.
$\frac{3}{7}$ of the boys leave, so boys remaining = $(g + 5) - \frac{3}{7}(g + 5) = \frac{4}{7}(g + 5)$.
4. **Given condition:**
The number of boys and girls remaining are equal:
$$\frac{3}{5}g = \frac{4}{7}(g + 5)$$
5. **Solve the equation:**
Multiply both sides by 35 (LCM of 5 and 7) to clear denominators:
$$35 \times \frac{3}{5}g = 35 \times \frac{4}{7}(g + 5)$$
$$7 \times 3g = 5 \times 4 (g + 5)$$
$$21g = 20(g + 5)$$
6. **Expand and simplify:**
$$21g = 20g + 100$$
Subtract $20g$ from both sides:
$$21g - \cancel{20g} = \cancel{20g} + 100 - 20g$$
$$g = 100$$
7. **Find number of boys:**
$$g + 5 = 100 + 5 = 105$$
8. **Find total pupils initially:**
$$g + (g + 5) = 100 + 105 = 205$$
**Final answer:**
The total number of pupils in the hall at first is **205**.
Boys Girls 54F5C0
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.