# These nations were left
"Yahweh left these nations in Canaan"
# as a means
"as a way"
# whether they would ... gave their ancestors
The words "they" and "their" refer to the people of Israel.
# the commands he gave
"the commands Yahweh gave"