Hi Lucy
Firstly, this is a real adventure with lots of chances for delays and deviations as it is the height of the rains in southern Tanzania and northern Mozambique.
It will be at least a two day trip from Dar to Mocimboa da Praia. And then you should expect another two days Rovuma - Pemba - Nampula, but possible three.
First day bus ride (road conditions south of Kilwa permitting), Dar to Mtwara.
Second day, dala-dala to Kilambo and pick-up or bicycle taxi 7km from Kilambo to the Ruvuma river.
Then you must befriend some other women local travellers to assist you paying for the row-boat across the Rovuma to Singa (Namoto), and the pick-up landcruiser taxi 5km to the Namoto border, 15km to Quionga (rains permitting).
The landcruiser will only take you to Palma, but you should be able to get to Mocimboa and the second day.
Third day bus Mocimboa to Pemba, and possibly another bus to Nampula, but almost all buses leave very early morning, so
Fourth day Pemba to Nampula.
Very experienced and resourceful travellers could do Dar to Nampula in just 3 days, but I doubt it during the rainy season.
But the good news is that yes, you can get a visa at the border going Mozambique back to Tanzania, but could be restrictions on SOME passports, too.
If you go it will be a tale to tell.
Mike