Kevin is right, the directions should explain how to do this. If you don't have the directions, here is how I do it, and I have done many over the years. Hook the implement to the tractor in the same way it will be hooked up in use. Remove the drive shaft completely form the implement and tractor. Take a tape measure and measure from the end of the tractor PTO shaft to the end of the implement shaft. Do not shift the implement so the shafts line up this should be done as the implement will be on the machine in use with the implement on the ground. Now measure the overall length of the drive shaft (collapsed), the difference in these lengths will be what you need to cut off the male and female shafts and also the covers. So if the distance between the implement and the machine is 30" and the overall length of the drive shaft is 36", you need to cut 6" off the male shaft, 6" off the female shaft, and 6" off of both the covers. This can be done with hacksaw, or abrasive cut-off saw, you will need to file the burrs off afterward. I hope that helps.
Brian