You have many options with today's internet so Thank you for choosing JustAnswer.com.
You need to remove the brake caliper and rotor from the hub. Using a punch and hammer drive the broken half out of the hub. If you have access to an air hammer it is much easier but a hammer and punch will work. Insert the new stud from behind. Using one of your lug nuts and a couple of washers flipped the lug nut over so the flat side is towards the hub. Using the lug nut to draw the stud in until the back of the stud is flush with the back of the hub. This will keep you from having to take the hub out and press the stud in.
P.S. I take great pride in providing quality responses for the people I assist. If you believe that I have been professional and helpful in my assistance please don't forget to give a positive rating for this exchange and click the accept button. If you feel my answer does not address your issues, please just tell me and I will opt out, allowing another technician to address your situation. My Goal is to make this experience one you appreciate.
You should be able to rotate the hub to a point that the stud will come out in an opening in the backing plate. Click the link below and save for the official procedure. This is showing the special service tool to push stud out.