To start with, you will want to define a global variable,
totalDistance or something similar, initialized as 0.
Then, you will want two global variables, with names like lastLat and lastLong, initialized with the current lat-long values when you start the app.
Now, there is a block which says when LocationSensor1. locationChanged do (...)
This should be called whenever you travel a certain distance (In my version of AndroidWheresMyCar it does not seem to work properly, but that is another issue).
In this do area you can retrieve the current lat/long, calculate your distance with the last lat/long in your global variables, add it to the total distance global variable and replace the values in your global last lat/long variables.
The next time the location changes you will execute the when ..locationChanged do ... again and you can repeat the trick.
I hope this makes sense to you.