To solve the problem step by step, we will first determine the work done by A, B, and C in one day, then set up an equation based on the information given about when they leave the work.
### Step 1: Determine the work done by A, B, and C in one day.
- A can complete the work in 10 days, so A's work in one day is:
\[
\text{Work by A in 1 day} = \frac{1}{10} \text{ of the work}
\]
- B can complete the work in 12 days, so B's work in one day is:
\[
\text{Work by B in 1 day} = \frac{1}{12} \text{ of the work}
\]
- C can complete the work in 15 days, so C's work in one day is:
\[
\text{Work by C in 1 day} = \frac{1}{15} \text{ of the work}
\]
### Step 2: Calculate the total work done by A, B, and C together in one day.
To find the total work done by A, B, and C in one day, we add their individual contributions:
\[
\text{Total work in 1 day} = \frac{1}{10} + \frac{1}{12} + \frac{1}{15}
\]
To add these fractions, we need a common denominator. The LCM of 10, 12, and 15 is 60. Thus:
\[
\frac{1}{10} = \frac{6}{60}, \quad \frac{1}{12} = \frac{5}{60}, \quad \frac{1}{15} = \frac{4}{60}
\]
Adding these together:
\[
\text{Total work in 1 day} = \frac{6 + 5 + 4}{60} = \frac{15}{60} = \frac{1}{4} \text{ of the work}
\]
### Step 3: Set up the equation based on the information given.
Let the total time taken to complete the work be \( x \) days. According to the problem:
- A works for \( x - 5 \) days (leaves 5 days before completion).
- B works for \( x - 2 \) days (leaves 2 days after A).
- C works for all \( x \) days.
Now, we can express the total work done in terms of \( x \):
\[
\text{Work done by A} = \frac{1}{10} \cdot (x - 5)
\]
\[
\text{Work done by B} = \frac{1}{12} \cdot (x - 2)
\]
\[
\text{Work done by C} = \frac{1}{15} \cdot x
\]
### Step 4: Combine the work done by A, B, and C and set it equal to 1 (the whole work).
The total work done is:
\[
\frac{1}{10}(x - 5) + \frac{1}{12}(x - 2) + \frac{1}{15}x = 1
\]
### Step 5: Solve the equation.
To solve this equation, we first find a common denominator for the fractions, which is 60:
\[
\frac{6}{60}(x - 5) + \frac{5}{60}(x - 2) + \frac{4}{60}x = 1
\]
Multiplying through by 60 to eliminate the denominators:
\[
6(x - 5) + 5(x - 2) + 4x = 60
\]
Expanding this gives:
\[
6x - 30 + 5x - 10 + 4x = 60
\]
Combining like terms:
\[
15x - 40 = 60
\]
Adding 40 to both sides:
\[
15x = 100
\]
Dividing by 15:
\[
x = \frac{100}{15} = \frac{20}{3} \approx 6.67 \text{ days}
\]
### Step 6: Conclusion
The total work lasts for approximately \( 6.67 \) days, which can be rounded to \( 7 \) days for practical purposes.