Let b be the number of students that were in each bus, since 111 students were on the trip, 23 students rode in cars, and the rest filled 4 buses, then we can set the following equation:
![111=23+4b\text{.}](https://img.qammunity.org/2023/formulas/mathematics/high-school/hc4ltfys9h91ojxxpxd1tchq7ebb0s2q5s.png)
Subtracting 23 from the above equation we get:
![\begin{gathered} 111-23=23+4b-23, \\ 88=4b\text{.} \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/high-school/qfu3o5cvfry91idl4yaxzbjgldqmq2ie63.png)
Dividing the above equation by 4 we get:
![\begin{gathered} (88)/(4)=(4b)/(4), \\ b=22. \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/high-school/2unajqj7090w7sf82dhbket6ebof050hf4.png)
Answer: 22 students.