<h2>
The number of small buses used = 5</h2><h2>
The number of big buses used  = 4</h2>
Step-by-step explanation:
Let us assume the total number of small buses needed = x
The capacity of 1 small bus  = 40
So, the capacity of x buses  = 40(x)  = 40 x
Let us assume the total number of big buses needed = y
The capacity of 1 big bus  = 50
So, the capacity of y buses  = 50(y)  = 50 y
Also, the total students travelling = 400
So, the number of students traveling by (Small bus + Big bus)  = 400
⇒ 40 x + 50 y = 400 ..... (1)
Also, the total number of drivers available  = 9
⇒ x +  y = 9  ..... (2)
Also, x  ≤ 8,   y ≤ 10
Now, solving both equations, we get:
40 x + 50 y = 400 ..... (1)
x +  y = 9  ⇒ y = (9-x) put in (1)
40 x + 50 y = 400  ⇒  40 x  + 50 (9-x)  = 400
or, 40 x  + 450 - 50 x  = 400
or, - 10 x  =- 50
or, x  = 5  ⇒ y = (9-x)  = 9- 5 = 4 
Hence the number of small buses used = 5
The number of big buses used  = 4