SOMEONE IN A DIFFERENT CITY ON PURIM
Gemara
Mishnah: If a Ben Ir (resident of an open city) went to a Kerach (walled city), or vice-versa:
If he will return to his place, he reads like in his place. If not, he reads where he is.
Gemara - Rava: The Mishnah says that he (a Ben Kerach) reads like in his place if he will return, i.e. before dawn of the 14th. If not, he reads with them (the Ir).
We learn this from "Ha'Prazim ha'Yoshvim b'Arei ha'Prazos". The repetition teaches that someone in a city for one day is called a Ben Ir.
Logic dictates that similarly, a Ben Kerach for one day is called a Ben Kerach.
Rava: If a villager went to a city he reads with them, whether or not he will return.
Question: What is the reason?
Answer: Really, he should read like a Ben Ir. Chachamim were lenient about villagers, because they supply food and water to the cities. The leniency does not apply to one who is in the city on the 14th.
Question (Abaye - Beraisa): If a Ben Kerach went to an Ir, in any case he reads like his place.
Objection: The Mishnah says that it depends on whether or not he will return!
Correction: Rather, the Beraisa should say 'if a villager went to an Ir (in any case he reads like his place.' This is unlike Rava!)
Answer: The Beraisa must be corrected in any case. We can correct it to say that he reads with them.
Yerushalmi (19b) Question: We understand what the Mishnah says about a Ben Kerach who went to an Ir. He was supposed to read later, but if he becomes Prazi for a day he must read that day;
But what does the Mishnah say about a Ben Ir who went to a Kerach? His time to read already passed!
Answer #1 (R. Yudan): We must delete from the Mishnah the clause concerning a Ben Ir who went to a Kerach.
Answer #2 (R. Yosi): The Mishnah discusses one who (left before the 14th and) will remain (in the Kerach).
Rishonim
The Rif brings the Mishnah, and cites Rava to say the following:
If a Ben Ir went to a Kerach (the Mishnah says that he reads like in his place if he will return). This is only if he will return on the night of the 14th, but was delayed and did not return. If he will not return that night, he reads with them. Just like a Ben Ir for a day is called a Ben Ir, a Ben Kerach for a day is called a Ben Kerach.
Objection (Ba'al ha'Ma'or): 'If he will return...but was delayed and did not return' makes no sense.
Answer (Meforshei ha'Rif): The Rif means that if he planned to return on the night of the 14th, but was delayed and did not return, he reads like in his place. I.e., it depends on his intent when he left his house. 'Paruz Ben Yomo' does not apply to someone who was detained against his will.
Milchamos Hash-m and Ran: The words 'If a Ben Ir went to a Kerach' in the Rif are merely a citation from the Mishnah, but the Rif explains that Rava discusses a Ben Kerach who went to an Ir. Similarly, if a Ben Ir went to a Kerach (after reading on the 14th) and will not return on the night of the 15th he must read again on the 15th. In the Yerushalmi R. Yosi explains that if a Ben Ir went to a Kerach with intent to remain there until the 15th, he is like a Ben Kerach and does not read until the 15th.
Rambam (Hilchos Megilah 1:10): If a Ben Ir went to a Kerach or vice-versa, if he intended to return to his place at the time of the Kri'ah but was delayed and did not return, he reads like in his place. If he intended to return after the Kri'ah, he reads with them.
Magid Mishnah: The Rambam discusses intent to return at the time of the Kri'ah in his original place. This is like Rashi.
The Rosh (2:3) brings the Mishnah, and cites Rava who says that 'if he will return' means on the night of the 14th.
Rosh (2:3): Rashi says that Rava refers to a Ben Kerach who went to an Ir. If he will remain there until the morning of the 14th he becomes like a Ben Ir and must read with them. Likewise, if a Ben Ir went to a Kerach and he will remain there until the morning of the 15th he becomes like a Ben Kerach and must read on the night and day of the 15th, even if he returns to his Ir on the 15th. If he knows that he will return on the night of the 15th he reads on the 14th like a Ben Ir. Rashi did not want to explain that Rava also refers to a Ben Ir who went to a Kerach, for it is unreasonable that being in a Kerach on the 14th should obligate reading like a Ben Kerach on the 15th, since the time to read did not come yet. However, the text suggests that Rava also refers to a Ben Ir who went to a Kerach, and the Yerushalmi confirms this. We can give a reason: just like Ben Kerach who remains in an Ir until the morning of the 14th becomes like a Ben Ir, a Ben Ir who remains in a Kerach until the morning of the 14th loses the status of a Ben Ir, so he becomes like a Ben Kerach.
Hasagos ha'Ra'avad: When a Ben Ir becomes like a Ben Kerach he must remain in the Kerach to read with them on the 15th.
Poskim
Shulchan Aruch (OC 688:5): If a Ben Ir went to a Kerach, or vice-versa:
If he (initially) intended to return to his place at the time of the Kri'ah but he was detained and did not return, he reads like in his place. If he intended to return after the Kri'ah he reads like in the new place.
Beis Yosef (DH v'Rabeinu and DH v'Divrei): The Tur explains regarding a Ben Kerach who went to an Ir, then says that the same applies to vice-versa. This is because the verse teaches about Paruz Ben Yomo, and from it we learn about Mukaf Ben Yomo. The Mishnah first discusses a Ben Ir who went to a Kerach, for this is more typical. The Rambam and Rif did not specify if they hold like Rashi (that Mukaf Ben Yomo depends on where he is on the 15th), or like the Rosh (it depends on the 14th). The Magid Mishnah and Ran explain them like Rashi.
Taz (6): If a Ben Kerach returned to his city before day, his intent to stay in the city has no effect. It is not clear why the Rambam says that the law depends on his intent at the beginning of the day of the 14th. Perhaps he means that it depends on his intent at the time of the night reading, which extends until the beginning of the day. The Tur says that he gets the law of his new place if he intends to stay for part of (daytime of) the 14th. Perhaps he holds that in pressed circumstances the time of the night reading is until sunrise, like Kri'as Shma.
Gra (DH bi'Zman): The law depends on his intent at the time of the day reading. It is primary; this supports the opinion (brought in Rema 692:1) that we bless Shehecheyanu again for the day reading. The Rosh explained that everything depends on the night of the 14th. This is because he thought that Rava explains the first clause of the Mishnah.
Chazon Ish (152:6): It depends on his intent at the start of the night, not on his intent when he left his city. One who leaves after the night began does not lose the law of his city. It is possible to be obligated in both readings, or exempt from both.
Kaf ha'Chayim (29): Alfasi Zuta says that one who is obligated in both readings blesses on both. This is difficult, for b'Di'eved a Ben Kerach is Yotzei on the 14th even if he never left his city! Rather, one should never bless when reading again on the 15th. It is best to hear the Berachos from someone else.