Tracks aren't one way, so even if you've seen a train traveling east, a train could travel west on the very same track. It's also important to keep in mind that locomotives can both push and pull rail cars, so the location of the locomotive isn't always an indicator of which direction the train is traveling.