Did you have a look at tester’s code? That explanation is there to understand his code primarily. Hence, certain omissions were done assuming you’d refer to it. What you said about car’s back and front, is dealt here-
If, we observe that the car was at different side. Basically, this section was meant to serve as “reference/comments” to tester’s code.
Tester calculates the location of cars rear at both times. He derives the location of car’s front using that. Nonetheless, thanks for bringing it to my notice, I will edit it to be clearer