How would someone contract HIV from a sex worker?
The same way they would contract HIV from anyone else. If the sex worker is HIV positive, a person could potentially contract HIV by having unprotected sex with them or sharing an intravenous needle with them. These activities are not guaranteed to transmit HIV even when a HIV positive person is involved, and they will not transmit HIV if neither party is HIV positive.