Do follow Michael's advice and leave early enough to insure you make your ship's departure.
How early you leave really depends on which ferry you take. Sailings from Cruz Bay (St John)
to Red Hook (St Thomas) are every hour, and only take about 20 minutes. Of course, then you
have to take a taxi, or some other transport, from Red Hook back to the docks, which easily
takes another 20 minutes.
Or, there are ferries leaving Cruz Bay and going directly to Charlotte Amalie that leave at 1:15PM,
2:15PM, and 3:45PM. They take about 45 minutes and put you off right downtown. From there,
either take a water taxi, cab, or ship's shuttle back to the dock.
Naturally, if you are tendered, you need to allow even more time.
You can get the ferry schedule and prices at:
http://www.vinow.com/general_usvi/interisland_ferry.com
Have a great trip.
Ted