First of all St. Johns is the place to go if you go to St. Thomas after you get the beaches of St. Thomas out of your system. So the next quesion is how do you get to Red Hook, There is a ferry that leaves from the downtown pier. It was operating about twice a day. If you can find out when it operates and it matches your schedule utilize it. When you come back from St. Johns it is the most direct and cheapest form of transport. Watch your time since you have to get back before ship departure and the ferry will meet these objectives.
This was proven to me after riding the ferry back. I returned to the cruise ship after shopping in town I rode the dolla taxi to the port. My friends who had traveled with me on the ferry were sitting on the porch of bar enjoying a beer. In other words there was plenty of time to get to ship.
If don't take the cruise from St. Johns to St. Thomas. You will have to get the local ferry over to Red Hook and get a taxi back to the port. You are at the mercy of the taxi driver on this run which may cost you as little as $20 for the ride to
Red Hook, but a lot more for a speedy ride to the port.
Also when you buy a ferry ticket you don't necessarily want to buy a round trip one. You may want to buy one from Red Hook to St. Johns and then buy another from St. Johns to St. Thomas.