(a) According to Rabah, egg laid on Shabbos was prepared yesterday, Yom Tov. If you sheckt the chicken yesterday (Yom Tov) and find an egg inside, you can eat it. Yet, we learned that it was prepared for the next day, Shabbos. Shouldn't it be assur.
(b) Furthermore, shouldn't there be a gazeira not to eat such an egg, for when Shabbos falls AFTER YOM TOV?
(a) There is nothing wrong with an egg that will be prepared for Shabbos, before Shabbos starts. It is only if the egg was prepared on Yom Tov for Shabbos, and it is not Shabbos, that it may not be eaten.
(b) This question is more difficult, but the Gemara itself addresses it. It answers that the Rabanan generally do not apply Gezeros to situations which only arise infrequently. It is uncommon, apparently, to eat eggs found inside of a slaughtered hen (perhaps they are slaughtered, like today, only after they stop producing). Therefore the Gezerah you proposed was not applied.
What you may be still wondering about, though, is why that permits the egg if it happens to be found in a hen slaughtered on Yom Tov which follows a Shabbos . In such a situation, a Gezerah should not be needed to prohibit the egg. It should be prohibited d'Oraisa, since there is at least a possibility that it was formed on the previous day (on Shabbos) for Yom Tov, and would have been laid today had the hen not been slaughtered. That should be considered Hachanah. This is a very good question, and we cite a number of answers given to it by the Rishonim in our Insights to the Daf, which I shall copy here for your benefit.
Best wishes, Mordecai
INSIGHTS INTO THE DAILY DAF
brought to you by Kollel Iyun Hadaf of Yerushalayim
6) EGGS FOUND INSIDE OF A HEN THAT WAS SLAUGHTERED ON YOM TOV QUESTION: The Gemara asks that eggs found inside a hen that was slaughtered on Yom Tov should be Asur because of a Gezeirah of eggs that were laid on Yom Tov (which, Rashi explains, refers to Yom Tov that falls right after Shabbos). These eggs, though, should be Asur for a different reason -- they are a Safek Isur! That is, there is a doubt whether the eggs that were extracted from the slaughtered hen were completed the day before, on Shabbos (in which case they are Asur because of "Hachanah d'Rabah"), or today, on Yom Tov (in which case they would be permitted according to most Rishonim, see above, 4:c)!
(a) TOSFOS (DH Milsa) explains that the problem of Hachanah, of being prepared on Shabbos for Yom Tov, occurs only retroactively, after the egg is laid. The RAMBAN (Milchamos) explains that this is because it is only at the moment it is laid, that one benefits from the completion of the egg that occurred the day before (on Shabbos), for now it becomes possible to eat the egg without slaughtering the mother. While the egg is still in the mother, one has gained nothing from its completion. The Rishonim (RA'AVAD and others) cite the Yerushalmi that presents a different reason why the egg's completion becomes useful only retroactively, after it is laid. After it is laid is when it is able to develop into a chick. Alternatively, that is when it begins to taste good. Before it is laid, the fact that it has been completed does not make a difference and thus it is not called "Hachanah" on Shabbos for Yom Tov..
(b) The RA'AVAD, explaining the opinion of RABEINU EFRAIM, says that an egg that is completed the previous day is laid immediately in the morning. If it is already later in the day when the egg is removed from the slaughtered hen, it is clear that it was not completed the day before, but today, and it is therefore permitted.
(c) RABEINU EFRAIM, as cited by the Ba'al ha'Me'or, indeed says that eggs found inside a hen are Asur because of a Safek that they might have been completed the day before. The way the Ra'avad (above, (b)) understands Rabeinu Efraim, he is only referring to eggs found in a hen slaughtered at night. However, it could be that Rabeinu Efraim is talking about eggs from a hen that was slaughtered even during the day, and he learns our Sugya differently. Instead of discussing a Yom Tov that falls right after Shabbos, the Gemara is discussing a regular Yom Tov that does not follow Shabbos. When the Gemara says that these eggs should be Asur because of a Gezeirah of eggs laid on Yom Tov, it does not mean a Gezeirah of other eggs laid on Yom Tov, but it means a Gezeirah that perhaps these eggs themselves were going to be laid today, and thus they should be included in the normal Gezeirah of eggs laid on Yom Tov! The Gemara answers that the Rabanan did not enact such a Gezeirah because it is uncommon to eat eggs found inside the hen. But if a hen is slaughtered on a Yom Tov which follows a Shabbos, the eggs would certainly be prohibited mid'Oraisa.