In general, when there's a starting amount and then an amount per something, it's a linear equation: y = mx + b. b is the starting amount, and m is the amount per something - the something is x.
y is the charge in this case, and x is the number of hours.
y = 12x + 25
The question mentions the total bill is 45: y=45.
45 = 12x + 25 That's the equation you can use to solve for x, the number of hours worked and billed.
45 - 25 = 12x
20/12 = x = 5/3.