Let the distance to school be \( D \) km.
Step 1: The time taken by the student to reach the school at the speed of \( 2 \frac{1}{2} \) km/hr is: \[ \text{Time} = \frac{D}{2.5} \quad \text{(in hours)} \]
Step 2: The time taken by the student to reach the school at the speed of 3 km/hr is: \[ \text{Time} = \frac{D}{3} \quad \text{(in hours)} \]
Step 3: The difference in time between the two cases is: \[ \frac{D}{2.5} - \frac{D}{3} = 10 \text{ minutes} = \frac{1}{6} \text{ hours} \]
Step 4: Solve for \( D \): \[ \frac{D}{2.5} - \frac{D}{3} = \frac{1}{6} \] \[ \frac{3D}{7.5} - \frac{2D}{6} = \frac{1}{6} \] Solving this, we find: \[ D = 4 \, \text{km} \] Thus, the distance to the school is 4 km.