• Don't understand the difference between tests

Question related to mission Simplify Unix Path

 

Hi, can anyone please explain me the difference between these two cases? Why we get different results here?