There are taxi's (mostly air-conditioned vans) waiting at each port. After our excursion in PV, we took a taxi to go shopping, and it was a set price of $6 for the cab to the shopping area.
We did an all-day (spur of the moment) "tour" with a van driver in Mazatlan, and for the van for 6 of us, it was $20 per person.
The van in Cabo was a set price of $6 (total) to take us to the shopping area.
We felt very safe, as they do this for their living, and are friendly, knowledgeable, and the vans/cars were clean.
Even catching a return taxi to the ship in PV and Cabo was very easy....there were tons of them!