The Voyager of the Seas will be at Naples at 07:00AM on August 7th and will leave Napoli at 07:00 PM.
Yo may take a taxi to Piazza Garibaldi (Main Rail Station.) It takes about 15 minutes. If you can go aboard the Voyager at 8 h AM or so, you can take the Circumvesuviana train , starting in Naples at 09:09 AM. Arrival in Sorrento will be at 10:17 AM. (The train before starts at 08:11h AM at Naples; arrival at Sorrento 09:03 AM)
Take the hydrofoil from Sorrento to Capri at 12.50 (noon) , 01:15 PM or 01:50 PM. Leave Capri with the hydrofoil at 5:10PM; so you will be at Naples Beverello ab about 6 PM.
But beware that all ferry and hydrofoil times may change.