It's very easy to get to Pompei on your own from the port in Naples. You can join a guided tour at the entrance to the ruins for a modest fee, then wander around on your own afterwards. When you are ready to push on to Sorrento there is a local train. Finally, you can take a ferry back from Sorrento to Naples, landing adjacent to the cruise port.
What day of the week will you be in Naples, and what are your hours in port? This is important if you will be using public transportation.
Perhaps your grandson would enjoy putting this day together, we can provide you with the links for all of the transportation options and timing and help craft the day. I know most of our kids (there was one holdout) enjoyed doing things like this in preparation for a trip, it ramped up the excitement for them and helped fill the time waiting until it was time to go.