For a 2012 prius, it was just take off the wheel, remove brake caliper (2 bolts), light tap with rubber mallet on the brake rotor, and it will expose the studs. Spun the axle or w.e its called a little bit for the stud to be exposed from behind the heat shield. Then I just hammered it off and it popped out. Put a new one in, lined the teeth with, impacted it on slightly. Put the rotor back on, put the caliper back on. put the wheel on, put all the lugs back on hand tightened. Impacted the lug with the new stud for a few more seconds, then torqued everything to 80 ft-lbs. The new stud takes a little longer cause as you torque it, it will slowly pull in. I haven't done this on my rav4 but it looks exactly the same to me. Hope this helps.
Maybe a repair shop in the past tightened the bolt way too tight and something happened when you torqued it. It's pretty hard for you or me to snap these. I had a firestone dealer tighten the nuts so tight on my Camry it took me a t wrench and long breaker bar to remove.