We are given that high school A filled 3 vans and 8 buses with 322 students. Let "x" be the number of students in a van and "y" the number of students in the bus then this can be written mathematically as:

High school B filled 8 vans and 6 buses with 322. Since each van and bus has the same number of students then we can write this as:

We get 2 equations and 2 variables. To determine the solution we will solve for "x" in equation (1). To do that we will subtract "8y" from both sides:

Now, we divide both sides by 3:

Now, we substitute the value of "x" in equation (2):

Now, we apply the distributive law on the parenthesis:

Now, we multiply both sides by 3:

Now, we add like terms:

Now, we subtract 2576 from both sides:

Now, we divide both sides by -46:

Now, we substitute the value of "y" in equation (1):

Solving the product:

Now, we subtract 280:

Dividing by 3:

Therefore, there are 14 students in the van and 35 in the bus.