Minimum overlap of the two shafts should be around 6" - more is better.
Maximum length should give you about 4" from your tractor's PTO point when fully compacted (slid together). This allows for easier attachment and allows the 3PH to be raised and lowered without binding.
However, there are heavy duty PTO shafts that have a 4" long bushing on the end that is the only engagement. In order to shorten it you have to cut off the bushing and weld it back on the shortened shaft. (from Tractor Supply)
Oh, and I store my PTO shafts apart (in two pieces) and lightly greased. Some shafts only go together one way so a little grinder mark is made on the ends of the shafts to show how to line it up for re-assembly.