Sandra can paint 1/6 of a room in 1 hr and Charles can paint 1/8 room in the same time.
Working together they can paint 1/6+1/8=7/24 of a room in 1hr.
To paint the whole room working together it will take 24/7=3 3/7 hrs to paint the room.
ANOTHER WAY
Let’s imagine they have 960 sq ft to paint.
Sandra can paint 160 sq ft in 1hr, while Charles can paint 120 sq ft in 1 hr.
Together they can paint 160+120=280 sq ft in 1hr.
So to paint 960 sq ft they would take 960/280=24/7 hours.