Answers:
Distance = 40 meters
Displacement = 0 meters
============================================
Reason:
The distance traveled is simply the sum of the two distances 20 and 20 to get 20+20 = 40. It's what anyone would expect when they ask "how far did the person travel in total?"
The displacement is the change in position from start to end. In this case, the student ends up back where they started, meaning no change has happened. If the teacher closed their eyes and opened them after the student gets back, then for all the teacher knows, the student hasn't moved at all.
Put another way, displacement tells us how far away the student has ended up compared to the start position. But since they went back to the start, no change has occurred.