First of all, what do you want to teleport? I'm guessing a player. 2nd When do you wnat to teleport that entity or player 3rd Where and when is that position saved? in a file? variable?
So something like a warp? If so i would recommend using this: https://poggit.pmmp.io/p/SimpleWarp/4.0.0 Or just studying it's code! so that you can create what you're looking for!