Take the ferry / hydrofoil (h. is faster) from Naples Porto Beverello (next to the cruise center; left side) to Capri. The port there is on the north coast. Link to the map:
Another useful link:
From the Marina Grande you can catch a boat for the blue grotto. They start all the time. In front of the lagoon you have to change the bigger boat for a smaller one. Beware of seasickness. All in all you have to spend about two and a half or three hours for that tour. (Maybe in september there are not so many tourits as in june, july or august; so you could do this in two hours.) Than take the funicolar to upper Capri for a short walk. Go back to the port for Naples. I suggest to see a little bit of the ancient town of Naples. Sorrento? For me it ist not a must. Anacapri is in the middst of the isle oc Capri. Forget it, if you have not plenty of time.