There are 5 girls more than boys in a class. if 2 boys joined the class the ratio of girls to boys is 5:4. find the total number of student in the class.

(b+5)/(b+2) = 5/4

...

Which is the smaller -3:5 or 5:6

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

Step 1: Assign variables
Let's assign variables to the number of boys and girls in the class. We'll call the number of boys "b" and the number of girls "g".

Step 2: Determine the given information
According to the problem, initially, there are 5 girls more than boys in the class. So we have the equation:
g = b + 5

Next, it is given that if 2 boys join the class, the ratio of girls to boys becomes 5:4. So we have the equation:
(g + 2) / (b + 2) = 5 / 4

Step 3: Solve the equations
Since we have two equations, we can solve them simultaneously to find the values of "b" and "g". We can start by substituting the value of "g" from the first equation into the second equation:

((b + 5) + 2) / (b + 2) = 5 / 4

Simplifying the equation:
(b + 7) / (b + 2) = 5/4

Now we cross-multiply:
4(b + 7) = 5(b + 2)

Simplify further:
4b + 28 = 5b + 10

Subtracting 4b from both sides:
28 = b + 10

Subtracting 10 from both sides:
18 = b

Step 4: Calculate the number of girls
We can use the value of "b" we found to determine the number of girls.

g = b + 5
g = 18 + 5
g = 23

So there are 23 girls in the class.

Step 5: Calculate the total number of students
To find the total number of students in the class, we add the number of boys and girls:

Total number of students = Number of boys + Number of girls
Total number of students = 18 + 23
Total number of students = 41

Therefore, the total number of students in the class is 41.