I made a demo for this ages ago, (
Link)
Somewhere in my posting history is a detailed explanation of that demo, but otherwise it's simple enough, it takes about 4 frames to move 1 square (that character on the 1st map of the demo counts frames over a specified amount of steps if 4 is wrong), and you know how many frames it's been since you started moving (store the frame count in a variable), so you can calculate how many squares your character should have moved (if it's been 20 frames, you should have moved 5 squares, divide frames by 4).
They should be 5 frames down, so when you teleport onto the map, transfer them 5 steps into the walking route