First, you would have to make the number of hours the x value and total cost the y value in the graph. Then, you would take however many hours to replace x, let’s say 5, and replace it for x in the equation y=8x+12, giving you y=8*5+12. You would then solve it by multiplying 8 and the x value, 5, giving you 40 in this example, and then adding 12, giving you 52 dollars for 5 hours.
To draw the line on the graph, you would start 0 hours with 12 dollars, 1 hour for 20 dollars, 2 hours for 28 dollars, and so on, adding 8 each time you add an hour.