Praise be to Allah.
Whoever has intercourse in the day in Ramadan when he is fasting and is not travelling has to offer a severe expiation, which is to free a slave. If he cannot do that, then he has to fast for two consecutive months. If he is not able to do that, then he has to feed sixty poor persons. He also has to repent and make up that day. The same is required of the wife if she was willing. It makes no difference whether ejaculation occurred or not; if intercourse, i.e., penetration, occurred, then expiation must be offered.
If they were travelling, then there is no sin and they do not have to offer expiation or refrain from eating and so on for the rest of the day. Rather they have to make up that day, because fasting was not obligatory for them.
If you are a resident of Riyadh and you have a house in Madinah that you go to when you are on leave, then when you go to Madinah you come under the same ruling as those who reside there, and you have to fast and offer the prayers in full, and it is haraam for you to break the fast by having intercourse and so on, and you have to offer expiation for having intercourse.
But if you went to Makkah, for example, then you do not come under the same ruling as those who reside there, unless you intended to stay there for more than four days. If you intended to stay there for less than that, then you come under the ruling on travelers.
Shaykh Muhammad ibn ‘Uthaymeen (may Allah have mercy on him) was asked: A man travelled from one city to another, and he owns a house in the city to which he travelled; should he offer the prayers in full or can he shorten them?
Shaykh: But is he a resident in that city? For example, does he stay for two or three months in one, then two or three months on the other, or what?
Questioner: He travels there during the summer vacation.
Shaykh: He goes there during the summer?
Shaykh: Then he should not shorten his prayers, because in fact he has two homes.
End quote from Liqa’ al-Baab al-Maftooh, 25/162
Based on that, if your breaking the fast happened before you entered Madinah, there is no sin on you for what you did, and all you have to do is make up that day, because you broke the fast because of travelling.
But if your breaking the fast happened after you had entered Madinah, then you have to offer expiation.
Our advice to you is to try to fast the two consecutive months on cold or moderate days when the day is shorter and there will be less difficulty involved, or during the days of annual leave from work and other times when you have the opportunity to do what is required of you. If you are genuinely unable to fast, then it is permissible for you in that case to feed sixty poor persons, giving them one meal, or giving several meals until you complete the number required.
See also the answer to question no. 106532
And Allah knows best.