When the body was moving from M to N,
Total distance covered = 400 km
Total displacement = 400 km
But, when the body was moving from M to X (i.e M to N then N to X)
Total distance covered = 400 + 80 = 480 km
Total displacement = 400 - 80 = 320 km