"And Joshua wrote these words in the book of the Torah of God" (Joshua 24:26). Rabbi Yehudah and Rabbi Nehemiah differ about this. One said: these are the last eight verses of the Torah. And one said: these are the cities of refuge. What is meant by "in the book of the Torah of God"? This is what he meant: And Joshua wrote these words among the writings in the book of the Torah of God.
What Joshua Wrote in the Book of God's Torah
Yalkut Shimoni on Nach 35:2
ויכתוב יהושע את הדברים האלה בספר תורת אלהים (יהושע כד כו). פליגי בה ר"י ור' נחמיה חד אמר שמונה פסוקים שבתורה וחד אמר ערי מקלט מאי בספר תורת אלהים, ה"ק ויכתוב יהושע את הדברים האלה בספרי הכתובים בספר תורת האלהים: