Let's start off by writing equations for each
Let's say the Red Bus Company is Company Red, and the Blue Bus Company is Company Blue to keep it short.
Company Red = 150 + 72(h) whereas h stands for how many hours
Company Blue = 240 + 54(h) whereas h stands for how many hours
Now, we plug in some numbers starting from 1 to see when the companies will match, however, I'll only do 2 examples to keep this short.
Let's start off at 5 hours (you can start off at any, but I prefer to be in the middle to see whether which company surpasses the other in cost and we can build off from there
Company Red:
150 + 72(5)
72 * 5 = 360
150 + 360 = 510
Company Blue:
240 + 54(5)
53 * 5 = 270
240 + 270 = 510
Wow, actually it looks like they charge will be the same after 5 hours. No need to do a second equation since we got it on our first try.