Bob's hose takes b hours to fill the pool, and fills 1/b of the pool per hour
Jim's hose takes 6 hours more, or b + 6, and fills 1 / (b + 6) of the pool per hour
together, they take 18 hours, and fill 1 /18 of the pool per hour
combine: 1/b + 1/(b + 6) = 1/18
multiply by 18b(b +6) to clear the fractions:
18(b +6) + 18b = b(b + 6)
18b + 108 + 18b = b^2 + 6b
0 = b^2 - 30b - 108
using the quadratic formula, b = 33.25 (discarding the negative root for time)
b + 6 = 39.25
check: 1 / 33.25 + 1 / 39.25 = 1/18 works
so Bob's hose can fill the pool is 33.25 hours, and Jim's hose can do it in 39.25 hours