Book of Deuteronomy have given various answers to the problem. The Deuteronomistic history theory is currently the most popular (Deuteronomy was originally just the law code and covenant, written to cement the religious reforms of Josiah, and later expanded to stand as the introduction to the full history); but there is an older theory which sees Deuteronomy as belonging to Numbers, and Joshua as a sort of supplement to it. This idea still has supporters, but the mainstream understanding is that Deuteronomy, after becoming the introduction to the history, was later detached from it and included with Genesis-Exodus-Leviticus-Numbers because it already had Moses
On the Reliability of the Old Testament the Old Testament. The book opens with an introductory chapter surveying the history with which it intends to deal, the continuous narrative in the Hebrew Bible from the Genesis creation narrative to the return of the Jews to Jerusalem from the Babylonian captivity in the early days of the Persian Empire in the 5th century BC. The author claims that this history was written at the same time as the events it describes in its various sections, and that this can be confirmed by comparing the Old Testament with non-Biblical sources, both written and archaeological. He clarifies by stating that