Distance is the total distance, which is given by adding the total length of the route covered.
Distance = 2.5 km + 1.8 km = 4.3 km
Displacement is the shortest distance between final and initial position.
Here since the initial and final position is same i.e. the student returns to his home in the end, the displacement is 0.