Let the total work be \( W \).
Step 1: Work done by Guddu and Sonu.
- Guddu can complete the work in 12 days, so Guddu's work rate is \( \frac{1}{12} \) of the work per day.
- Sonu can complete the work in 24 days, so Sonu's work rate is \( \frac{1}{24} \) of the work per day.
Step 2: Total work done when they both work together.
Let Sonu work for \( x \) days. In \( x \) days, the total work done by both Guddu and Sonu is:
\[
\text{Work done by Sonu} = x \times \frac{1}{24}
\]
\[
\text{Work done by Guddu} = x \times \frac{1}{12}
\]
The total work done in \( x \) days is the sum of the work done by both:
\[
\text{Total work done by both} = x \left( \frac{1}{24} + \frac{1}{12} \right) = x \left( \frac{1}{24} + \frac{2}{24} \right) = \frac{3x}{24} = \frac{x}{8}
\]
Step 3: Work done by Guddu after Sonu leaves.
After Sonu leaves, Guddu finishes the remaining work in 6 days. The remaining work is:
\[
\text{Remaining work} = 1 - \frac{x}{8}
\]
Since Guddu works at a rate of \( \frac{1}{12} \) of the work per day, the work done by Guddu in 6 days is:
\[
\text{Work done by Guddu in 6 days} = 6 \times \frac{1}{12} = \frac{1}{2}
\]
Step 4: Solve for \( x \).
The remaining work is \( \frac{1}{2} \), so we have the equation:
\[
1 - \frac{x}{8} = \frac{1}{2}
\]
Solving for \( x \):
\[
\frac{x}{8} = \frac{1}{2}
\]
\[
x = 4
\]
Step 5: Conclusion.
Sonu left after 4 days, which corresponds to option (1).