Transfer Naples to Amalfi/Ravello (and back)

I arrive late night on Friday, 30 Sep 2022 to Naples airport with Ryanair flight (FR6687, expected landing at 22:10 hrs). Would like to transfer immediately (upon landing) to Ravello or Amalfi but think the only possible option is by taking a private car transfer (which is costly). I might spend the night in Naples and early next morning (Saturday, 1 Oct 2022) depart from Naples city centre to Ravello (or Amalfi) by bus/es or ferry. Please would you be so kind to advise me what are my best (money and time-wise) options?

I have inbound flight to catch from Naples airport on Monday, 3 Oct 2022 (FR6688, expected take off at 21:55 hrs). Please would you be so kind to advise me what is my best transportation option from Ravello or Amalfi to reach the airport and have enough time to check in at Naples airport (when should I depart from Ravello or Amalfi)?

Looking forward to hear from you (if you wish so, you can reply in Italian language). Many thanks for your support and help,

Gore