I'll be honest - I don't know what I would do.
I tend to believe that if I was really the only person around, I would help. Unlike some other countries

, in my country I wouldn't fear that someone would later sue me for 'inappropriate' or 'incompetent' rescue (or how it is called in your part of the world). I don't think anything like that would be possible. I wouldn't even try to call rescue service, until I try everything that I know and can do myself. However, if I saw an attractive woman (preferably young girl) being
stuck, I would definitely have hard-on, what would surely complicate my rescue mission. Seriously, I am afraid to think what would happen if I was swimming in a little channel near the place where I have a summer cottage (and where some quicksand really exists) and met a girl trapped in quicksand. It would be totally uncomfortable situation.
Another concern is the victim's behavior. I am not a professional rescuer, and I have no experience and actually no special desire in comforting hysterical girls. Would she be hysterical, would she ignore what I would tell her, would she beware something what she shouldn't beware - I could become irritated.
Finally, if I actually was one of several people, I would probably leave the leading role to somebody else. I am not a leader by nature. I would be giving advices, of course. Honestly, even in my fantasies I am not the rescuer. I depict other (younger) people as rescuers. I am mostly a watcher. A voyeur.