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