The men of Judah attacked Jerusalem and captured it. They killed everyone there and set the city on fire.
However, Judah was not able to force out the people of Jebus who lived in Jerusalem. So they still live with Judah in Jerusalem today.
The men of Benjamin did not force out the Jebusites who lived in Jerusalem. The Jebusites still live with the tribe of Benjamin in Jerusalem today.
After that, the men of Judah went to fight the Canaanites who lived in the mountains, the Negev, and the foothills.