A school is using two vans A and B to take groups of students on a field trip. If two students move from van A to van B, the two vans would have the same amount of students in each. If two students move from van B to van A, then van B would have half the number of students of van A. Find the total amount of students on the trip.

Answers with working would be appreciated!

Let's denote the number of students in van A as A and the number of students in van B as B.

According to the given information, if two students move from van A to van B, the two vans would have the same number of students. This can be expressed as:

A - 2 = B + 2 ----(1)

Similarly, if two students move from van B to van A, van B would have half the number of students of van A. This can be expressed as:

A = 2(B - 2) ----(2)

Now, let's solve these two equations to find the values of A and B.

Solving equation (1) for A, we get:

A = B + 4 ----(3)

Substituting equation (3) into equation (2), we can eliminate A:

B + 4 = 2(B - 2)

Expand the equation:
B + 4 = 2B - 4

Move the terms around to isolate B:
0 = B - 8

B = 8

Substituting the value of B back into equation (3), we can find A:

A = 8 + 4
A = 12

Therefore, van A has 12 students and van B has 8 students. The total number of students on the trip is:

Total = A + B = 12 + 8 = 20

So, there are a total of 20 students on the field trip.