So,
since the amount of boys that remain is twice the amount of girls that left:
Its, 9X2=18
18 boys
(we can assume that the amount of girls that left is equal to the amount that remains)
And since the amount of girls is = to the amount of boys,
its 18+18=36
So the original amount of students present is 36 students
Hope this helps!