handy said:
Probably by cross-referencing and comparing other scriptures to the texts. And, applying a bit of common sense. For instance, while it's clear that Moses either wrote or more likely spoke the words of Deuteronomy 33:2-29, it's also obvious that he couldn't have written Deuteronomy 34.
Unfortunately the Pentateuchal corpus does not claim for itself Mosaic authorship (a bad guess, I believe, of the Second Temple period that continues to this day traditionally among Jews and inerrantist/fundamentalist Christians).
As for your example that it is 'clear Moses...wrote or...spoke' pieces of Deut.33.2-29 but not Deut.ch.34, that's hardly provable, and there's no indication of a shift in literary style from ch.33 to ch.34.
According to my view Moses neither wrote nor spoke the words of anything in Deuteronomy, and this is demonstrable beginning with the very first words of the book:
Deut.1.1
These are the words which Moses spoke to all Israel
across the Jordan in the wilderness, in the Arabah opposite Suph, between Paran and Tophel and Laban and Hazeroth and Dizahab.
'Across the Jordan' would be the east side of Jordan, and of course, Moses never crossed over from the east to the west. But the phrase 'across the Jordan' itself gives the perspective of an author who's already in Canaan (i.e. west of Jordan).
Deut.1.5; 4.41,46-49 continue to give the persepctive of the true author who's writing in Canaan. Respectively, the author(s) does attempt to properly quote Moses from Moses' perspective east of the Jordan:
Deut.3.19-20
But your wives and your little ones and your livestock (I know that you have much livestock) shall remain in your cities which I have given you, until the LORD gives rest to your fellow countrymen as to you, and they also possess the land which the LORD your God will give them
beyond the Jordan [in Canaan] then you may return every man to his possession which I have given you.
Deut.3.25
Let me, I pray, cross over and see the fair land that is
beyond the Jordan [in Canaan], that good hill country and Lebanon.'
Deut.11.30
Are they not
across the Jordan, west of the way toward the sunset, in the land of the Canaanites who live in the Arabah, opposite Gilgal, beside the oaks of Moreh?
The author makes the effort to put Moses in proper perspective. However, he unwittingly and mistakenly reveals his own west of Jordan perspective and disconfirms that Moses' speeches are truly Mosaic:
Deut.3.8
Thus we took the land at that time from the hand of the two kings of the Amorites who were
beyond the Jordan, from the valley of Arnon to Mount Hermon
The land of which Moses speaks is
east of Jordan. Moses is already east of Jordan, having never crossed west of Jordan, and he speaks as if the east of Jordan (his location) is
across the Jordan.
May I ask why it's important?
I don't believe Moses wrote the Pentateuch. Traditionalists believe Moses wrote pretty much everything from Genesis--Deut.ch.33. The actual literary evidence shows something quite different.