It's so easy to get to Herculeneum on your own. You can get on the #1 tram on the street directly in front of the cruise port, this tram drops you right in front of the Porta Nolana starting point for the Circumvesuviana regional rail line.
You can take any train going to either Poggiomarino or Sorrento, both lines stop at Ercolano Scavi, the stop for Herculeneum. The walk from the station to the park ticket office is about a half mile in a dead straight line. It's very easy.
Just reverse the process to return to Naples, but get off the train at the penultimate stop, Garibaldi, and switch to the #1 metro line to get quickly to the historic center of town.
You'll likely get back to Naples at lunchtime, perfect to enjoy a pizza in its home town.