Why Positano?
Ferries from Positano can be and are cancelled due to sea conditions so it’s not the best place to transfer to Rome from
Ferries don’t run after a certain time of day either and stop running at some point in October
Travel from Pompeii to Positano will require local train to Sorrento then bus or ferry to Positano -that will take a couple of hours
Positano is worth a few hours at most IMO
Another option is ferry or bus from Positano to Salerno then direct fast train to Rome-
Or hire a driver to Salerno
I hope you are not flying out of Rome on the day you leave Positano-it’s just not possible