Let, the distance between the house and school be D kms.
Case 1 : Running at the speed of 5 km/h a student reaches his school from his house 15 minutes early
Time taken = t1= D/5 hrs -->(1)
Case 2 : Walking at 3 km/h, he is late by 9 minutes
Time taken = t2= D/3 hrs -->(2)
Now, t2 - t1= 15/60 + 9/60 = 0.4
0.4 = D/3 - D/5 (From (1) and (2) )
Solving, D=3 kms(ANS)