Not only does this Pasuk not seem to belong here, but they also traveled from Moseirah to B'nei Ya'akan (See Bamidbar 33:31), and not vice-versa?
Rashi and Targum Yonasan: Based on the following episode hinted here, it belongs to the rebukes that comprise the current Parshah 1 : When Aharon died on Hor ha'Har, and the Ananei Kavod disappeared, Yisrael, threatened by the king of Arad (Amalek, who reigned in Arad - Targum Yonasan), appointed a leader to return to Egypt, 2 and traveled back eight encampments to B'nei Ya'akon and from there to Moseirah. At that stage, the B'nei Levi fought with them and brought them back to Gudgod 3 . During the battle, many families on both sides were killed. 4 Rashi, on Pasuk 7: Whilst in Moseirah however, they attributed the many deaths to the fact that they failed to eulogize Aharon, so they eulogized him there and then. 5
Rashbam: In answer to the potential query on Moshe - that Aharon was no longer alive, so how could he claim to have Davened for him, Moshe is reminding them here that, at the time of the Golden Calf Aharon was alive and well, and that it was only much later that he died, in the fortieth year, when they traveled from Be'eiros B'nei-Ya'akan, where they had arrived from Moseirah, and from where they traveled to Hor ha'Har.
Seforno: 'Despite the fact that they saw how the Tefilah of a Tzadik (Moshe) shields over the generation - in which case they should have mourned Aharon's death, some of them - or even most of them, whilst pasturing their flocks in the desert, made their way to Moseirah to look for water and grazing-ground for their sheep. Yet when, whilst they were there Aharon died, they did not return to mourn for him or to participate in his burial. Nor did they take the trouble to pay their respects to Elazar, who succeeded him; but traveled straight from there to Gudgodah.'
Rashi: Beginning with the additional Kashya that Aharon died, not in Moseirah, but on Hor ha'Har - which was eight encampments away from Moseirah - See Bamidbar, 33:31-3.
Rashi: Which is synonymous with Chor ha'Gidgad (Bamidbar 33:32), the next stop on their itinerary.
Rashi (Ibid.): And the Torah writes "Sham Meis Aharon", because due to the great Hesped that they delivered in Moseirah, it seemed as if Aharon had died there.
Why did Moshe juxtapose this incident to the breaking of the Luchos?
Rashi #1 (on Pasuk 7, citing Vayikra Rabah): To teach us that the death of Tzadikim in the eyes of Hakadosh-Baruch-Hu is akin to the breaking of the Luchos.
Rashi #2 (on Pasuk 7): To teach us that when they declared "Nitnah Rosh ve'Nashuvah Mitzraymah" (where they appointed another for to replace Hashem was compared to the day that they made the Golden Calf.