If someone cannot fast during Ramadan due to illness, travel, or other valid reasons, they are exempt from fasting, and they can make up the missed fasts at a later time.
However, if the illness or travel is of a long-term nature, and it is not expected to improve, then they are required to pay fidyah, which is a charitable donation to feed the poor and needy. The amount of fidyah is equivalent to the cost of providing one meal for a needy person for each day of missed fast.
Muslims who are unable to fast during Ramadan are encouraged to make up the missed fasts as soon as they are able. They can do so at any time during the year, but it is recommended to do so before the next Ramadan.
It is important to note that the exemptions to fasting during Ramadan are only for those who have a valid excuse. Otherwise, failing to fast without a valid reason is considered a sin in the Islamic faith.
In summary, if someone cannot fast during Ramadan due to illness or travel, they are exempt from fasting, and they can make up the missed fasts at a later time or pay fidyah.