The consequence of building the city is spoken of as if it were a cost that Hiel paid. Alternate translation: "and the consequence of his sin was that Abiram, his firstborn son, died" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Speaking "by" someone represents both telling someone to speak and the person doing it. Alternate translation: "which Yahweh caused Joshua son of Nun to speak" (See: [[rc://en/ta/man/translate/figs-metonymy]])