If clearance is tight you might need to pull the axle shaft. Pounding out the old one might be easy, keep in mind you're smacking the shaft against the oil seal, but putting a new one back in might be tough. The new stud will be longer and might not fit without pulling the shaft.
This requires removing the 4 bolts near the rear brake backing plate. Small little guys but they hold the axle in the housing. Remove the rear brake line and slide the shaft out. If you remove the backing plate you've got easy access to the back of the flange the stud is pressed into. It's also easier to use a press to remove and install the stud. If you have access to a press you minimize the chances of buggering up axle seals or the axle flange.