Hi Marian,
If Bob can do it alone in 14 hours then he can do 1/14 of the job each hour
James can do 1/18 of the job each hour.
let x = time it takes them working together
then
x/14 + x/18 = 1 (this statement says that the number of hours x times Bob's rate and James's rate added will give 1 or the full job
18x + 14x = 252
32x = 252
x = 7.875 hours (time to finish when working together
Hope this helps