They have options as to what they want to do once the main 3 actors decide to stop.
A) They recast, that's the most unlikely in my opinion. Each actor has pretty much defined what Tony Stark, Steve Rogers and Thor(Chris) are, and using a different actor to do the role probably wouldn't go well.
B) They replace the character in the suit. This is the most likely option, Tony, Steve and Thor(Chris) are gone...different people wear the Iron Man suit, the Captain America costume, and wield the Mjolnir(might be hard with events of Ragnarok). This is something that has happened to all 3 at different times in the comics. It also keeps the option for small cameos by all 3 actors if they want to.
C) They retire the heroes for a while. This is also a possibility, have other character take the lead for a few years. Black Panther, Captain Marvel, Spider-man, and others they could introduce in the next few years. Then reintroduce them later on using option A or B...which might be more easy to do later.
It's still a few years away though. What do we know for sure now? Black Panther 2018, Infinity War 2018, Ant-man 2 2018, Captain Marvel 2019, Infinity War 2 2019....a Spider-man 2, and Guardians 3...do we have anything else announced for sure yet?