If a person runs along a straight path of 2 kilometers and moves 3 kilometers leftward, follows a pentagonal path for 5 kilometers, and returns to the starting point after running a six-kilometer square half the distance to the endpoint, what is the distance that person traveled leftward and rightward from the straight path?