Number of girls at the time of the assembly started = w
Number of girls left = 40% of w
[tex]=\frac{40}{100}w[/tex]
[tex]=\frac{2}{5}w[/tex]
Remaining girls = [tex]w-\frac{2}{5}w[/tex]
[tex]=\frac{3}{5}w[/tex]
Now, the ratio of the number of boys to girls became 3 to 4.
Let n be the number of boys.
Then, [tex]n:\frac{3}{5} w=3:4[/tex]
Or, [tex]\frac{n}{3w/5}= \frac{3}{4}[/tex]
[tex]\frac{5n}{3w}= \frac{3}{4}[/tex]
20n = 9w
or, n = [tex]\frac{9}{20} w[/tex]
Total number of boys and girls = [tex]\frac{9}{20}w+ \frac{3}{5} w[/tex]
[tex]= \frac{9}{20}w+ \frac{12}{20} w[/tex]
[tex]= = \frac{21}{20}w[/tex]
Hence, the total number of boys and girs is [tex]\frac{21}{20} w.[/tex]