Problem: After an earlier embarrassing defeat because of disobedience to God, Joshua’s forces completely destroyed the city of Ai (Josh. 8:28). But it is still flourishing many years later (Neh. 7:32).
Solution: This is many centuries later, and the city was rebuilt by survivors or others. Phrases like “utterly destroyed” (Josh. 8:26) refer to all who got caught. It does not say that some did not escape. Nor does it eliminate the possibility that others moved in later to occupy the site.
This same explanation applies to the Amalekites who were completely destroyed (1 Sam. 15:7–8), yet survived to be overthrown at a later date (1 Sam. 30:1, 17). Likewise, Bethel and Gezer were conquered by Joshua (Josh. 12:12, 16) and later under the judges (Jud. 1:22–29). However, Genesis 32:3 may refer to the settlement of Edom by anticipation (cf. Gen. 36:6, 8).