Need figure out how get to Rome from Hotel Triton on Amalfi Coast, are there trains straight through?
If this is the hotel you mean -- https://www.grandhoteltritone.com/en/hotel-praiano.htm -- you have to make your way to Salerno or Naples for a 'direct' train
From Sorrento there is a commuter train to get you to Naples, where you can get a direct train to Rome.
The hotel may have some suggestions on what might work best for you specific needs.
This should give you an overview of what is involved: