1. Given the total time for the round trip is 6 hours, express the individual times:
\text{Time to run to Versailles} = \frac{x}{6} \, \text{hours}
\text{Time to walk back to town} = \frac{x}{3} \, \text{hours}
2. The equation for the total time is:
\frac{x}{6} + \frac{x}{3} = 6
3. Find a common denominator to combine fractions:
\frac{x}{6} + \frac{2x}{6} = 6
4. Simplify the equation:
\frac{3x}{6} = 6
\frac{x}{2} = 6
5. Solve for \( x \):
x = 12
6. Therefore, the distance to Versailles is:
x = 12 \, \text{km}