This problem is best to do in steps, since you have to find out how far the buses go and then come back... you could do the math into one, giant equation but it's easier to segment it out and draw a timeline, especially since we don't have a calculator. .
So it takes the first bus \(\frac{180km}{60mph} = 3:00 hours\) to get to point Y. It then waits there another 15 minutes...
The second bus waits 15 minutes and then starts heading for y at \(40mph\)
this means that at the time the first bus leaves point Y, the second bus will have been travelling for 3:00 hours \((3:15-15)\)
Which means that it will have covered \(40mph * 3:00 hours = 120m\)
Which means that they are now 3:15 into the journey and \(180m - 120m =60m\) apart...
The two of them, together, can close the distance in \(\frac{60m}{(40mph + 60mph)} = .6 hours = 36 minutes\)
So the total time before they meet is \(3:15 + 36= 3:51minutes\)
The total distance away from point X of the second bus would be \(120m + (40mph * .6hours) = 144 miles\) which means that the bus has \(180-144= 36 miles\) left to go.
So the final answer is B.