Deuteronomy 3:21
And I commanded Joshua at that time, saying, Thine eyes have seen all that the LORD your God hath done unto these two kings: so shall the LORD do unto all the kingdoms whither thou passest. And I commanded Joshua at that time, saying, Thine eyes have seen all that the LORD your God hath done unto these two kings: so shall the LORD do unto all the kingdoms whither thou passest.
The verse stands in the first of three addresses given by Moses just before his death, in chapters 1 to 4:40, where he rehearsed God's goodness to Israel, what God had done for them, and the lessons of forty years in the wilderness before Israel crossed the Jordan into the promised land.
The two kings were rulers of nations wholly given over to evil, whose destruction was recorded because to have preserved them alive would have brought only corruption and evil.
Moses reminded Joshua that his own eyes had seen all that the Lord had done to those two kings, as a pledge and assurance that the Lord would do the same to all the kingdoms whither Israel would pass and would fight for Israel against the kingdoms they would encounter.
Those victories taught Israel to depend on God for success and to recognize His claim over what they gained.