Question 246298
From a group of boys and girls, 
b = no. of boys
g = no. of girls
:
then 15 girls leave.  There are then left two boys for each girl.
{{{b/(g-15)}}} = {{{2/1}}}
Cross multiply
b = 2(g-15)
b = 2g - 30
:
After 45 boys leave, there are then 5 girls for each boy.
{{{(b-45)/(g-15)}}} = {{{1/5}}}
Cross multiply
g-15 = 5(b-45)
g - 15 = 5b - 225
g = 5b - 225 + 15
g = 5b - 210
:
The number of girls in the beginning was:
Replace b in the above equation with (2g-30) from the 1st equation:
g = 5(2g-30) - 210
g = 10g - 150 - 210
g = 10g - 360
g - 10g = -360
-9g = -360
g = {{{(-360)/(-9)}}}
g = +40 girls originally