There are several ways to approach this question. This is my approach.

kathy takes 4 hours to paint 1 room

Rhonda takes 6 hours to paint 1 room

Kathy takes 24hrs to paint 6 room

Rhonda takes 24 hrs to paint 4 room

Together they can paint 10 rms in 24 hrs

Therefore 1 Room will take 24 / 10 = 2.4 hrs to painted by both of them

For the second question :

Let the number be x.

1/8x = 1/x + 1/(x-6)

Find x.

Hope it helps.