Hi Samy,
Make sure you follow along with the same steps you see in the video lesson.
You can only type some things directly on the driver in the way you are attempting.
You will need to define what the variables are in the drivers editor. This is shown in the video.
Blender doesn’t know what “loc” is until you tell it. You do that in the other window.
To answer your question about whether this is mandatory to get the animation.
It is if you are going to drive the rotation on a single axis. This means you can set it up and then you can just translate the ‘car’ forward and backwards and it will calculate the rotation automatically.