If Sally can paint a house in 4 hours, and John can paint the same house in 6 hour, how long will it take for both of them to paint the house together?

This the ans 2 hours and 24 minutes but how did they work it out?

Sally's rate = 1 house/4 hrs

John's rate is 1 house/6 hrs

Their combined rate of painting is 1/4 + 1/6 = 10/24 houses per hour

The time it takes both of them to paint one house is therefore

1 house/(10/24) houses per hour = 2.4 hours.

More generally:

If it takes one person 5 hours to paint a room and another person 3 hours, how long will it take to paint the room working together?

Method 1:

1--A can paint a room in 5 hours.
2--B can paint a room in 3 hours.
3--A's rate of painting is 1 room per A hours (5 hours) or 1/A (1/5) room/hour.
4--B's rate of painting is 1 room per B hours (3 hours) or 1/B (1/3) room/hour.
5--Their combined rate of painting is therefore 1/A + 1/B = (A+B)/AB = (1/5 + 1/3) = (8/15) rooms /hour.
6--Therefore, the time required for both of them to paint the 1 room working together is 1 room/(A+B)/AB rooms/hour = AB/(A+B) = 5(3)/(5+3) = 15/8 hours = 1 hour-52.5 minutes.

Note - Generally speaking (if the derivation is not specifically required), if it takes one person A units of time and another person B units of time to complete a specific task working alone, the time it takes them both to complete the task working together is T = AB/(A + B), where AB/(A + B) is one half the harmonic mean of the individual times, A and B.

You might like to derive the equivalant expression involving 3 people working alone and together which results in T = ABC/(AB + AC + BC).

Method 2:

Consider the following diagram -
..........I<----------B---------->I
..........I_______________I_________________
..........I........................../........................../\
..........I..*...................../............................I
..........I.....*................/..............................I
..........Iy.......*........../................................I
..........I................../..................................I
..........I*****x******/ ...................................I
..........I............./....*................................(c)
..........I(c-y)..../.........*...............................I
..........I......../...............*...........................I.
..........I....../....................*........................I
..........I..../.........................*.....................I
..........I../..............................*..................l
.........I./...................................*...............\/__
.........I<-----------------A-------------->I

1--Let c represent the area of the house to be painted.
2--Let A = the number of hours it takes A to paint the house.
3--Let B = the number of hours it takes B to paint the house.
4--A and B start painting at the same point but proceed in opposite directions around the house.
5--Eventually they meet in x hours, each having painted an area proportional to their individual painting rates.
6--A will have painted y square feet and B will have painted (c-y) square feet.
7--From the figure, A/c = x/y or Ay = cx.
8--Similarly, B/c = x/(c-y) or by = bc - cx.
9--From 7 & 8, y = cx/a = (bc - cx)/b from which x = AB/(A+B), one half of the harmonic mean of A and B.

I think this should give you enough of a clue as to how to solve future problems.

Three People Version

It takes Al 5 hours to paint a shed, Ben 10 hours and Charlie 15 hours. How long would it take all three to paint the shed working together?

1--A can paint the shed in 5 hours.
2--B can paint the shed in 10 hours.
3--C can paint the shed in 15 hours.
4--A's rate of painting is 1 shed per A hours (5 hours) or 1/A (1/5) shed/hour.
5--B's rate of painting is 1 shed per B hours (10 hours) or 1/B (1/10) shed/hour.
6--C's rate of painting is 1 shed per C hours (15 hours) or 1/C (1/15 shed/hour.
7--Their combined rate of painting is therefore 1/A + 1/B + 1/C = (AC + BC + AB)/ABC = (1/5 + 1/10 + 1/15) = (11/30 sheds /hour.
8--Therefore, the time required for all of them to paint the 1 shed working together is 1 shed/(AC+BC+AB)/ABC sheds/hour = ABC/(AC+BC+AB) = 5(10)15/[5(15)+10(15)+5(10) = 30/11 hours = 2.7272 hours = 2hr-43min-38.18sec.

Note - The time required to complete a single "specific task" by three individuals working together, who can complete the task individually in A, B, and C units of time is ABC/(AC + BC + AB).

To determine how long it will take for Sally and John to paint the house together, we can use the concept of work rate.

Let's calculate their individual work rates first:
Sally's work rate is 1 house / 4 hours = 1/4 house per hour.
John's work rate is 1 house / 6 hours = 1/6 house per hour.

When they work together, their work rates are combined as follows:
Their combined work rate is Sally's work rate + John's work rate = 1/4 + 1/6 = 3/12 + 2/12 = 5/12 house per hour.

Now, to find out how long it takes for them to paint the house together, we can set up a ratio involving their work rates:
Sally and John complete 1 house in (5/12) hours.

To convert this fraction into hours and minutes, we can multiply by 60:
(5/12) * 60 = 300/12 = 25 minutes.

So, it will take Sally and John a total of 2 hours and 25 minutes to paint the house together.