The boy's father asked the total distance he has walked.and that's why his answer was 3+3 i.e 6km
But, the boy's brother was asked about displacement.
And we know that displacement=final position-initial position
Initial position and final position is same hence displacement = 0