All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Abu Ayyoob Al-Ansaari reported that the Prophet, sallallaahu ‘alayhi wa sallam, said, "It is not lawful for a Muslim to abandon his (Muslim) brother beyond three nights; they meet so each turns away from the other, and the better of the two is the one who greets the other first." [Al-Bukhari and Muslim]
The hadeeth does not apply to the case in your first question because the two did not abandon each other, stop talking to each other, or turn away from each other when they met; rather, their life circumstances entailed or compelled them into going their separate ways.
The hadeeth does not apply to the case in the second question either as long as their intention was not to abandon each other but they did not meet for normal reasons until more than three days had passed. They bear no sin, Allaah willing, because were they to meet, they would greet each other and not turn away.
As for the third question, the Muslim bears a sin for abandoning his fellow Muslim for four months, even if he forgives him in his heart, because it is impermissible for the Muslim to forsake his Muslim brother for more than three days, as underlined above, unless there is a valid reason such as the case when the abandoned person boldly and openly commits sins or religious innovations or persistently harms others.
He bears no sin if he abandons him for a Sharee'ah-acceptable reason. Al-Haafith Abu ‘Umar ibn ‘Abd Al-Barr wrote:
"Scholars reached a scholarly consensus that it is allowable to forsake one's fellow Muslim more than three days if maintaining relations with him entails undermining the person's religiosity or causes harm to him or his worldly affairs. It is permissible for him to forsake the one of whom he fears that talking and keeping ties with him will undermine his religiosity or harm him in his worldly life. There is no doubt that a good-intentioned distance is often better than a harmful interaction..." [At-Tamheed]
For more benefit, please refer to fatwa 84976.
There is no harm in supplicating Allaah in favor of the forsaken person to bless him with goodness and forgiveness. It is recommended for the Muslim to supplicate Allaah in favor of his fellow Muslims in their absence. The Prophet, sallallaahu ‘alayhi wa sallam, said, "The supplication of a Muslim for his (Muslim) brother in his absence will certainly be answered. Every time he makes a supplication for good for his brother, the angel appointed for this particular task says, 'Aameen, and the same for you.'" [Muslim]
As for your thinking that Allaah would forgive you because of your supplication in favor of the person whom you had forsaken, then we hope that Allaah grants you this, but for benefit, we quote the statement of Imaam An-Nawawi in his commentary on Saheeh Muslim:
"Scholars said that having good expectations of Allaah means believing that Allaah will have mercy on him and pardon him. They said that when a person is in good health, he should feel both fear and hope, in equal measure, and fear should be more prevalent. Then, when signs of the approach of death are witnessed in a person, his hope should outweigh his fear, or should replace it, because the purpose of fear is to prevent one from committing sins and ugly deeds and make one keen to carry out many acts of obedience and good deeds, but all that – or most of it – is no longer the case in this situation. Therefore, it is recommended to think positively of Allaah and acknowledge one’s need for Allaah, The Almighty, and submissively surrender to Him then." [Sharh Muslim]
Finally, we advise you, after fearing Allaah, to refrain from forsaking your fellow Muslims more than three days without a Sharee'ah-approved reason and to supplicate Allaah for your fellow Muslims to bless them with all that is good and to forgive their sins.
Allaah knows best.