Let X be the number of hours:
Waiter A = 25 + 6.25x
Waiter B = 30 + 5.25x
Set them equal and solve for x:
25 + 6.25x = 30+5.25x
Subtract 25 from each side:
6.25x = 5 + 5.25x
Subtract 5.25x from each side:
1x = 5
It will take 5 hours for both waiters to charge the same amount.