These are the names of places.
Here "they" refers to the people of Judah, and encamped probably refers to "lived in houses".