Cody can do the job in 8 hours.
He does 1/8 of the job each hour.
Caitlyn can do the job in 6 hours.
She does 1/6 of the job each hour.
Working together, they do (1/8 + 1/6) of the job each hour.
Can you add those fractions ?
Change both to a denominator of 24.
1/8 = 3/24
1/6 = 4/24
(1/8 + 1/6) = (3/24 + 4/24) = 7/24
Working together, they do 7/24 of the job each hour.
Invert (7/24 job/hour) and you have (24/7 hour/job) .
24/7 = (3 and 3/7) hour/job.
Together, it takes them 3-3/7 hours.
(That's 3hours 25minutes 42.9 seconds.)
The question says "write an equation".
The equation could be H (number of hours) = 1 / (1/8 + 1/6)