You're going to love the Carnival Legend!! We did this same cruise 2 years ago and are going back again in June.
Even though Carnival says arrival time in San Juan is 3 pm, if no problems are encountered enroute from New York, you'll be docked by 2 pm. Since you like to hike, as soon as you get off the ship, hike up to El Morro and explore this beautiful fort. Do this first, as the fort closes around 5 or 6 pm. Then take a stroll thru the streets of Old San Juan, with perhaps a stop at Senor Frogs for a cocktail or two.
St. Thomas is your best bet for shopping, but a word of advice. If you are looking for something in particular, do your homework before you leave as to what the going price is for the item you want. You would be surprised at how many people pay more in St. Thomas for an item they could have gotten cheaper at home!! But leave the shopping for the afternoon. In the morning, take a cab over to Coki Beach (coral world is next door!!), Sapphire beach, or Magens Bay (can get crowded) and enjoy the morning on the sand or in the water. Or you could head over to St. John and Trunk Bay (very popular).
In Tortola, book an excursion with Carnival, over to the Baths in Virgin Gorda. A little hiking and climbing is involved here so this may be right up your alley!! I always book with Carnival here because of the short time at this port (leave at 2 pm), and I don't want to worry about getting back to the ship late.
Back on board the Legend, as soon as you board in New York, be sure to make a reservation at the Golden Fleece supper club, for at least one night during the cruise. The $30. surcharge per person is well worth the experience!!!
Have a GREAT cruise!!!