The pronoun them
refers to the enemies mentioned in Nehemiah 4:11. Those who lived near them
refers to Jews living in the villages and towns distanced in, say, a 50 kilometre radius of Jerusalem and hence in proximity to these enemies to the north, south, east, and west (Nehemiah 11:25; only a small percentage of the returned exiles actually lived in Jerusalem, Nehemiah 11:1).
12 At that time the Jews who lived near them came from all directions and said to us ten times, “You must return to us.”