Step-by-step explanation and the Answer:
The first thing we must do is define variables. We have x= number of hours and y= total cost .
For the first company we have:

For the second company we have:

To find the number of hours for which the cost is the same we have to match both equations:

From here, we clear x:

The answer is the number of hours for which the costs are the same is: x = 8 . So it's B. 8.