Classes A and B have 35 students each. If seven girls shift from class A to class B, then the number of girls in the classes would interchange. If four girls shift from class B to class A, then the number of girls in class A would be twice the original number of girls in class B. What is the number of boys in class A and class B?

Please help. I'm not able to form a correct equation to solve.

If A has a girls and B has b girls, then we are told:

a-7 = b
a+4 = 2b
So,
a=18
b=11

That means that A had 17 boys and B had 24 boys

To solve this problem, let's start by identifying the information given and assigning variables to the unknown quantities.

Let's assume the original number of girls in class A is 'x', and the original number of girls in class B is 'y'. We also know that class A and class B both have 35 students, so the total number of students in each class is 35.

Using this information, let's analyze the given conditions step by step:

1. "If seven girls shift from class A to class B, then the number of girls in the classes would interchange."

If seven girls shift from class A to class B, the number of girls in class A would be reduced by seven (x - 7), and the number of girls in class B would increase by seven (y + 7).

According to the condition, the number of girls in class A (x - 7) would become equal to the number of girls in class B (y + 7). So, we can write the equation:

x - 7 = y + 7 ----> Equation 1

2. "If four girls shift from class B to class A, then the number of girls in class A would be twice the original number of girls in class B."

If four girls shift from class B to class A, the number of girls in class A would increase by four (x + 4), and the number of girls in class B would be reduced by four (y - 4).

According to the condition, the number of girls in class A (x + 4) would be twice the original number of girls in class B (2y). So, we can write the equation:

x + 4 = 2y ----> Equation 2

Now, we have two equations (Equation 1 and Equation 2) with two unknowns (x and y), which we can solve to find their values.

Let's solve the equations simultaneously.

From Equation 1, we can rearrange it to get x in terms of y:
x = y + 14 ----> Equation 3

Substitute Equation 3 into Equation 2:
y + 14 + 4 = 2y (since x = y + 14)
y + 18 = 2y

Now, subtract y from both sides:
18 = y

Substitute y = 18 back into Equation 3 to find x:
x = 18 + 14
x = 32

So, the original number of girls in class A (x) is 32, and the original number of girls in class B (y) is 18.

Now that we know the number of girls in each class, we can find the number of boys in class A and class B.

Since the total number of students in each class is 35, we can subtract the number of girls from 35 to obtain the number of boys.

For Class A:
Number of boys in Class A = Total students in Class A - Number of girls in Class A
Number of boys in Class A = 35 - 32
Number of boys in Class A = 3

For Class B:
Number of boys in Class B = Total students in Class B - Number of girls in Class B
Number of boys in Class B = 35 - 18
Number of boys in Class B = 17

Therefore, there are 3 boys in Class A and 17 boys in Class B.