Let the number of buses be x
and car be y
• Total vehicle gone are 21
x + y = 21 ..... ( i ) × 4
• There are 30 people in buses and 4 on car total people gone are 318
30x + 4y = 318 ..... ( ii )
Sub ( ii ) from ( i ) × 4
4x + 4y - ( 30x + 4y ) = 84 - 318
4x + 4y - 30x - 4y = - 234
- 26y = - 234
y = 9
Putting the value of y in eq i
x + y = 21
x = 21 - 9
x = 12
Total buses are 12
and total car are 9
Hope it helps...