You first need to get transport, be that bus or taxi, from the airport to Dublin Heuston station where your train begins it's journey. If you are on time you will be travelling in the shoulder peak. Allow an hour plus the time to immigrate, whatever that is.
It will be a lot cheaper to buy your train ticket in advance BUT it is fixed to that one timed departure. It will cost 25 Euro or 34 Euro to be able to amend up to 60 minutes before departure.
Buy at the station and you will pay 49.45 Euro each.
The risk is that you are still in the air due to a delay at the 60 minute deadline, so you have no data/wifi to do the amend.
Swings and roundabouts.