E phraim didn’t drive out the Canaanites who lived in Gezer, but the Canaanites lived in Gezer among them.
Ephraim did not drive out the Canaanites who were living in Gezer. So the Canaanites lived in Gezer among them.