Did the shaft disengage from the differential or did the CV joint separate?

If the shaft actually pulled out if the diff you'll need to take the axle nut off, line the half shaft up in a straight line and tap it With a soft blow hammer to reseat the splines