It can be done, I watched my auto shop teacher lengthen a driveshaft 2" back in the 80's using some pipe and lathe.
The equipment that the modern driveshaft shops have now is so good and quick, I'm not sure that a backyard fix is worth the time though in messing around.