Price for company A:
p(A) = 10 + 5*h
Price for company B:
p(B) = 7*h
,where h is the hours.
To find the hours after which the prices for both are going to be the same, we set the price for A equal to the price of B and calculate h.
10 + 5*h = 7*h <=>
2*h = 10 <=>
h = 10/2 <=>
h = 5 hours