Both of them, it's just experience.
Inexperienced drivers in a car when faced with an unfamiliar situation (loss of traction) will tend to go "WTF!" and jam on the brakes.
In a FWD, this equals sliding forward, no steering, unless you have ABS.
In a RWD, weather you have ABS or not, it equals sliding out
Therefore, FWD generally safer, especially ABS equipped ones.
That said...
An experienced driver in a FWD still has to 'get rid' of the understeer to make it round the corner. IE buttoning off gas, maybe straightening up a bit, gentle brakes, etc... basically same as an unexperienced driver, except they don't brake hard, they let the front wheels grip instead of brake.
Same driver in a RWD can 'guide' oversteer through the corner with countersteering and throttle control. AKA drift. Front wheels still grip, so we have steering, and weather the rear end 'yanks' the fronts away (spinning out) depends on the throttle control.
Another consideration... a 'family' car usually has spongy suspension, which makes drift more difficult to control... so if it's a soft suspensioned car, FWD would be safer. Any attempts to 'correct oversteer' in a soft-suspension RWD would have to be done delicately, or body roll would throw the car completely the other way.