Actually, they are in the same direction from Naples. Capri is an island that sits a few miles off the coast of Sorrento, both of which are south of Napls. It is a lot close to take a boat from Capri to Sorrento than it is to take a boat from Capri to Naples. But, Naples offers very fast hydrofoils which really shorten the trip while I believe that all the boats between Capri and Sorrento are the somewhat slower "jet boats" (I do not recall any hydrofoils running between Capri and Sorrento---...but I could be wrong). If you were to take a train from Sorrento to Naples you would head North and the train line would go through Pompeii and than Ercolano (this is the location of Herculanium) before arriving at Naples. So, if you want to go to both Sorrento and Capri you can actually do it in any order using a combination of train and boat. From Capri you can catch a boat directly to Sorrento and than use the train from Sorrento to Naples or vice versa. If you would take any kind of boat directly back to Naples (such as from Capri) it is important to make sure the boat goes to Mollo Beverello, which is the name of the pier adjacent to your cruise ship. There are a few boats that dock at a different Naples pier called Mergellina which is located about 3 miles from the ship. Sorry to make this sound complicated (its not) but its good to know all the facts.