Let the number of passengers bought Rs 3 tickets = x
and the number of passengers bought Rs 10 tickets = y
Given, there are 40 passengers in a bus
=> x + y = 40 ...............1
Again, total collection from the passenger is Rs 295
=> 3x + 10y = 295 .........2
Multiply by 10 in equation 1, we get
10x + 10y = 400 ............3
Now, subtract equation 3 and 2, we get
10x + 10y - 3x - 10y = 400 - 295
=> 7x = 105
=> x = 105/7
=> x = 15
So, the number of passengers bought Rs 3 tickets is 15