There are 3 public transit options from Sorrento to Paestum. 1: Take an Amalfi Coast ferry to Salerno and then either a bus or train to Paestum (which is actually a fair distance from Salerno). 2: Take a bus to Amalfi, another bus to Salerno and then either a bus or train to Paestum. 3: Take the Circumvesuviana to Pompeii Scavi stop, walk, bus or taxi to Pompei train station and then train to Paestum. The Paestum bus stop is a 1 or 2 minute walk from the entrance while the train station is about a 5 minute walk. You could also take the Circumvesuviana all the way to Naples and then another train to Paestum, but that’s a lot of extra travel compared to changing train lines in Pompei. (BTW, no misspelling here – there’s only one “i” in the name of the town.) Investigate whether there’s a Campania all-day transit pass that would cover all bus and rail segments. A pass wouldn’t cover ferry or taxi.
I did this as a full-day trip a few years back, opting for bus along the Amalfi coast, a couple of hours visiting Amalfi town, bus to Salerno and bus to Paestum. On the return, I did the trains via Pompei, with the walk between stations taking about 25 minutes. It was a long day, but I packed a lot of sightseeing into it. I found the trains to be fastest route, but I wanted to combine the scenic Amalfi Coast ride with my visit to Paestum.