“here.” In Shiloh where the Tent of Meeting was at the time.
“cast lots.” The Hebrew is “throw a lot,” but the singular verb is likely a collective singular. By using the lot, the decision about which tribe got which land area was up to Yahweh (cp. Prov. 16:33).