Solution:
Let the number of girls in class A=xLet the number of girls in class B=y
Total students in class A and class B each=35
7 girls shift from class A to class B
Girls in class A= x – 7
Girls in class B= y + 7
After shifting the number of girls in the class interchanged.
x – 7 = y --------------- (1)
Now, 4 girls are shifted from class B to class A.
Girls in class A= x + 4
Girls in class B= y – 4
So, after shifting
x + 4 = 2y -------------- (2)
Solving eq (1) and eq (2), we get
x + 4 = 2(x - 7)
x + 4 = 2x – 14
On solving, we get x= 18
Put the value of x in eq (1), we get
18 – 7 =y
y = 11
So, the number of boys in class A= 35 – 18 = 17
The number of boys in class B= 35 – 11 = 24.
Hence, Option (4) is the correct answer.