Answer:
Number of cars=3
Number of buses=4
Explanation:
Let the number of cars be x, and the number of buses be y.
x+y=7 (total number of vehicles) ---①
5x+45y=195 (total number of students) ---②
*each car holds 5 students, whereas each bus holds 45, which equals to 5x and 45y
From equation ①,
x=7-y ---③
Substitute ③ into ②
5(7-y)+45y=195
35-5y+45y=195
40y=195-35
40y=160
y=4
Therefore,
x+y=7
x=7-y
x=7-4
x=3