“edge of the Arnon River valley.” The city of Aroer is south of Heshbon and on the north side of the Arnon River valley (which often is more of a canyon than what we normally think of as a valley, which is wider and does not necessarily have steep sides).
“and half of Gilead (as far as to the Jabbok River valley).” This is to the north. So Joshua 12:2 describes Sihon’s territory to the south first, then to the north. The Jabbok River goes eastward from the Jordan River, but then swings southward to Rabbah, the ancient capital of the Ammonites.
“the border of the children of Ammon.” The Ammonites were descended from Abraham’s nephew Lot, and God gave the territory of the Ammonites to them and did not allow Israel to attack or try to conquer it (Deut. 2:19).