Each bus ride costs two dollars.
Your slope for this would be: f(x)=-2x+30
What ever number you plug in for x you will find the total amount left of money. After plugging in 12 you end up with 6 Dollars. which after subtracting 6 from 30, you end up with 24 dollars being spent.