Explanation:
Let the number of students in each van be "x" and the number of students in each bus be "y". We can then set up a system of equations to represent the given information:
From High School A: 8x + 8y = 240
From High School B: 4x + y = 54
We can use the second equation to solve for y in terms of x:
y = 54 - 4x
We can then substitute this expression for y into the first equation and solve for x:
8x + 8(54 - 4x) = 240
8x + 432 - 32x = 240
-24x = -192
x = 8
Now that we know x = 8, we can use the equation for y to solve for y:
y = 54 - 4x = 54 - 4(8) = 22
Therefore, there were 8 students in each van and 22 students in each bus.