A bathtub is draining at a constant rate. After 2 minutes, it holds 30 gallons of water. Three minutes later, it holds 12 gallons of water. Write an equation the represents the number of y of gallons of water in the tub after x minutes.