A family went to a basketball game. They parked the car in a parking lot which charged $5. The cost per ticket was $24. Write an equation for the total cost of going to the basketball game, where y is the total cost an x is the total number of people. If the family spent $173, how many people went to the game?