For the information given in the statement let:
 *h: number of hours the bike was rented
 *R(h): total cost of renting the bike
So you have the following linear equation

And since Melanie paid $74 to rent a bike then

Now you can solve for h

Therefore, Melanie paid for a 7 hours bike rental.