Take the reciprocals of both their times, except make the numerators a single variable. Add together to make a sum of 1 (representing 1 complete job):
x/4 + x/6 = 1
Solve for x.
3x/12 + 2x/12 = 12/12
5x = 12
x = 12/5, or 2.4
It will take them 2.4 hours, or 2 hr 24 min.