A classroom contains an equal number of boys and girls. If 9 girls​ leave, twice as many boys as girls remain. What was the original number of students​ present?

(g - 9) = (1/2) b

but g = b
so
2 (b-9) = b
2 b - 18 = b
b = 18
so g = 18
and total = 2*18 = 36

Let's assume the original number of boys and girls in the classroom is 'x'.

After 9 girls leave, there will be (x - 9) girls left in the classroom.

Given that twice as many boys as girls remain, the number of boys remaining is 2 * (x - 9).

Since we are given that there is an equal number of boys and girls in the classroom, we can set up the following equation:

x = 2 * (x - 9)

Now let's solve this equation step by step:

1. Distribute the 2 on the right side:
x = 2x - 18

2. Move the x term to the left side by subtracting x from both sides:
x - 2x = -18

-1x = -18

3. Divide both sides by -1 to isolate x:
x = (-18) / (-1)

x = 18

Therefore, the original number of students present in the classroom was 18.

To solve this problem, let's break it down step by step.

Let's start by assuming the number of boys and girls in the classroom as 'x'.

According to the problem, "A classroom contains an equal number of boys and girls." So, initially, there are 'x' boys and 'x' girls in the classroom.

Now, it is given that "9 girls leave." So, after 9 girls leave, the number of girls remaining is 'x - 9'.

Next, the problem states that "twice as many boys as girls remain." So, the number of boys remaining would be 2 times the number of girls remaining, which can be written as '2 * (x - 9)'.

According to the problem, the number of boys remaining is equal to the number of boys initially present. So, we can equate the number of boys initially present ('x') to the number of boys remaining ('2 * (x - 9)').

x = 2 * (x - 9)

Now let's solve this equation:

x = 2x - 18 (distributing the 2 on the right side)

x - 2x = -18 (subtracting x from both sides)

-x = -18 (simplifying)

x = 18 (multiplying both sides by -1 to get 'x' alone)

Therefore, the original number of students present in the classroom was 18 boys + 18 girls = 36 students.