The lengths, relative to one another, are basically irrelevant to your question. The ONLY issue for your problem is whether both driveshafts have sufficient 'room' built in to allow for compression without collapsing and putting pressure on the powertrain.
If your rig still has stock suspension and driveline, this should not be an issue. The factory incorporates sufficient slip in the drivelines for the amount of 'droop' the factory suspension will allow. As soon as you add longer shackles, you increase the chance that your suspension can drop further than the driveshaft can handle.
If you have a lift, then that problem increases. IF you have a shackle reversal on your front end, then your problem switches from droop to compression. If you have an engine conversion, then you have the additional issue of what amount of 'slip' the installer allowed for when modifying the driveshafts.
None of these relates to driveshaft comparisons front to rear.
Hth
Mark A.