This phrase means "they cast lots to decide who would get the valuable things that they took from Jerusalem." (See: [[rc://en/ta/man/jit/figs-explicit]])
"it was as though you were one of these strangers and foreigners." This implies that they did not help the Israelites. This can be made explicit. Alternate translation: "you were like one of the enemies and did not help Israel" (See: [[rc://en/ta/man/jit/figs-explicit]])