A family went to a baseball game. They parked the car in a parking lot which charged $10. The cost per ticket was $20. 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 $150, how many people went to the game?