We have to find how many students were in each bus.
We can call this quantity "x".
The total number of students is 317.
This quantity can be divided in the number of students that rode in cars, 22, and the rest went in 5 buses.
The quantity that rode in bus can be expressed as 5x.
Then we can write:
[tex]22+5x=317[/tex]We can solve this as:
[tex]\begin{gathered} 22+5x=317 \\ 5x=317-22 \\ 5x=295 \\ x=\frac{295}{5} \\ x=59 \end{gathered}[/tex]Answer: there were 59 students in each bus.