By walking in a straight line, the people will follow a great circle. They begin by travelling parallel to each other, so the 1km they are apart at the start is the furthest they will be apart. They will be 1km apart again after walking half way around the world and will collide at one quarter and three quarters of the way around.
Hence, each person will walk one quarter of the circumference of the Earth before colliding, which will be 10,018km.
Another way to see that this is the answer is to assume that the people stand on the equator and walk North. They will meet at the North Pole, one quarter of the way round.
If two people stand 10km apart and walk in the same direction, how far will the have to walk until they collide due to the curvature of the Earth? (diameter of Earth = 12,742km)