There is a general expression for solving problems of this type which the folowing example will illustrate.
If it takes me 2 hours to paint a room and you 3 hours, ow long will it take to paint it together? >>
Method 1:
1--A can paint the house in 5 hours.
2--B can paint the house in 3 hours.
3--A's rate of painting is 1 house per A hours (5 hours) or 1/A (1/5) houses/hour.
4--B's rate of painting is 1 house per B hours (3 hours) or 1/B (1/3) houses/hour.
5--Their combined rate of painting is 1/A + 1/B (1/5 + 1/3) = (A+B)/AB (8/15) houses /hour.
6--Therefore, the time required for both of them to paint the 1 house is 1 house/(A+B)/AB houses/hour = AB/(A+B) = 5(3)/(5+3) = 15/8 hours = 1 hour-52.5 minutes.
Note - T = AB/(A + B), where AB/(A + B) is one half the harmonic mean of the individual times, A and B.