When did Yehoshua take the land, and when did he give it for inheritance?
Malbim: He took it during the seven years of conquest, and gave it for inheritance during the seven years of division.
When was the land quiet from war, and why?
Radak: (It was after the seven years of conquest.) The Kena'anim were not aroused to gather and fight with Yisrael, for they saw that they fell in front of them in all of their wars. Also Yisrael stood in the land that they conquered, and were not aroused to conquer more. When Yehoshua grew old, Hashem told him to make Yisrael zealous to conquer the remaining land, and to apportion it in his lifetime. He apportioned first to Yehudah and Yosef, for they are the heads of Yisrael and are at the borders, Yehudah in the south and Yosef in the north (18:5); the other seven Shevatim are in the middle. 1 Since the conquered the south and north borders, and the east and west borders were the Yarden and Yam ha'Gadol, they slackened from conquering the rest in the middle, for they were not worried.
Malbim: It was after the years of conquest and of division.
Rashi (18:5): Yosef was in the north of what they had conquered. (According to Radak, why does it say that Binyamin was between Yehudah and Yosef (18:11)? All seven Shevatim were between them! It must mean that Binyamin bordered both of them (Yerushalayim is listed on the borders of Binyamin and Yehudah, and Chazal say that a strip from Yosef entered Binyamin at Shilo). If so, one could draw a [perhaps crooked] line from south to north of Eretz Yisrael going only in these three Shevatim. One can draw a line from east to west of Eretz Yisrael within only Naftoli, which borders the Yarden in the east, and Zevulun, which borders the sea in the west, and it touches Naftoli (19:33,34). These lines must cross. The intersection cannot be both in Yehudah, Binyamin or Yosef, and also in Naftoli or Zevulun! Also, Chamas, on the northern border of Eretz Yisrael (Bamidbar 34:8), was in Naftoli (19:35)! (Radak must say that it was another city of that name.) Also, Shechem was in the middle of Eretz Yisrael (from south to north), and Kedesh was in the north (Makos 9b). Kedesh is in Naftoli (21:32)! Also, if Yosef had from the middle until the north of Eretz Yisrael, how could they complain that they received too little (17:14)?! (Radak says there that only Menasheh complained. Did Efrayim get about half of Eretz Yisrael, and Menasheh a small portion?!) Perhaps Radak explains according to Pshat, unlike the Gemara. He will say that Galil is in the middle, and not in the north, and the Arei Miklat are listed in a strange order (Kedesh in the middle, Shechem in the north, Chevron in the south), and Hashem showed Eretz Yisrael to Moshe like this (Naftoli in the middle, Efrayim and Menasheh in the north, Yehudah in the south