Public transit seemed relatively safe to me, when I was there 2 years ago. The Amalfi coast is no that great though. Rather go to Naples, use a day for small boat trip to either Capri or Ischia, one day to take the commuter train to Herculaneum. After that take the train from Naples to Salerno, which is a good bit less touristy and ceaper than the real Amalfi coast. Perhaps take a boat from Salerno to look at the Amalfi coast from the sea (more beautiful that way anyway) or enjoye some of the beaches that are reachable with public transit nearby. In Salerno you can also take a train or Bus to Paestum, which is a UNESCO world heritage site has some greek temples from 600 BC.