To calculate the average velocity you use the final displacement, regardless of whether the person actually walked along the vector or not.
In diagram 1 you can see the arrangement in question. The green arrow shows the displacement vector to use.
In diagram 2 there is a different arrangement. The green arrow again shows the displacement vector to use.
Why use those vectors even though the person did not walk along them? Displacement is defined as a straight line joining the start position and end position. So you can walk along a very convoluted route between two positions but your final displacement will always be a straight line between the start and end positions.
If you start and end in the same position your average velocity will be zero. How can that be? Well if you sum up your total velocity vectors during the journey they add up to zero. They are positive whilst travelling away from start and negative whilst travelling toward the start (remember that vectors have direction and positives/negatives indicate direction).