Let r and s represent the number of times Caleb can ride the roller coaster and watch a show, respectively. The time Caleb needs to allow for each roller coaster ride is (wait time) + (ride time) = (30 +5) min = 35 min. Then we can write the equations
r - s = 3
35r +25s ≤ 345
Adding 25 times the first equation to the second, we get
25(r -s) +(35r +25s) ≤ 25(3) +(345)
60r ≤ 420 . . . . . . collect terms
r ≤ 7 . . . . . . . . . . . divide by 60
Caleb can ride a maximum of 7 roller coasters and watch 4 shows in 345 minutes.
_____
The problem can obviously be worked using two equations instead of one equation and an inequality. It isn't clear until the final answer that the number of minutes comes out exactly the amount needed, which is why we chose an inequality.