28a rashi d"h bishlomo
The gemoro says that reb yochonon should agree in a case where there's a sofek which sister fell to yibum 1st, that you must do chalitza to both.
Then the gemoro says the mishna can't be talking about this sofek, cos why does it say "kodmu vkonsu yotziu" bishlomo the 1st brother he was married beissur achos zekukoso, but the 2nd brother is only sofek married to an osur lo, because he might have stumbled upon the 1st sister who is chozroh lehetero horishon.
I don't understand why it's poshut that the 1st brother has to be motzi!? So what, if he did an issur when he got married to one of those 2 sisters. Right now his other brother did yibum with the other sister so he should he allowed to keep his wife as well. The same way the gemoro says at the bottom of 23b that we should say "im kodmu vkonsu, yekaymu" just like the case of the mishna in 23a, and the gemoro answers that this case of 4 brothers and 2 sisters is different, because if you say yesh zika, then the sisters both became ossur together so they are ossur forever. But reb yochonon doesn't hold of this rule for the 1st sister! He holds that the 1st sister was mutar during nefila rishona so she goes back to the original heter when the zika is removed. E.g. when the brother does chalitza, ir in this case when the brother did yibum. And since there's a sofek for the 1st brother as well, perhaps he stumbled upon the correct sister and his brother did yibum to the 2nd sister, therefore there is only a sofek issur for this brother right now as well. Its only a sofek if she was a the 2nd sister to fall to yibum, (in which case reb yochonon says "kol yevomoh she'eyn ani kore..yovo oleho...") or she might be the 1st yevomo that fell to yibbum so in that case she has now become mutteres with the illegal yibum from the 2nd brother??!!
Avrumi Hersh, London england
1) Avrumi, there is a lot to think about here, and for the moment I am just going to deal with what you cited from the end of 23b, "Im Kadmu v'Kansu, Yekayemu," like the Mishnah on 23a. I cannot find what you cite from 23b, and I am not sure what you mean by the Mishnah on 23a, but what you are saying sounds similar to the opinion of Beis Shamai in the Mishnah on 26a (which is also cited by the Gemara at the end of 29a, where Rashi writes, "Im Kadmu v'Kansu Yekayemu"), where the two brothers should not, l'Chatchilah, do Yibum with the two sisters, but if they did we are not Motzi them. The Rambam (in Perush ha'Mishnayos, beginning of the third chapter) writes that the Psak Halachah here is Yekayemu.
So this may be your question: Why does the Gemara on 28a ask, "If so, why does the Mishnah say 'Kadmu v'Kansu Yotzi'u', but the Rambam writes that the Halachah in the Mishnah is Kadmu v'Kansu Yekayemu?
At any rate, there is a lot to work on here.
2) After thinking more about your question, I believe that it is an explicit Mishnah (30a):
a) The third Mishnah on 30a gives a golden rule: "Harei Zo Asurah Alav Olamis Ho'il v'Ne'esrah Alav Sha'ah Achas." Rashi (DH Sha'ah Achas) writes that if a Yevamah was forbidden to the Yavam when she falls to him the first time, she can never become permitted to him later on.
b) This in fact is stated by Rashi (end of bottom23b; not like you wrote, that we say there "Im Kadmu v'Kansu Yekayemu"). Rashi there (23b, DH Mai Shena) cites the Mishnah (26a) which states "Im Kadmu v'Kansu Yotzi'u." Then, on the last line on 23b, Rashi writes that any Yevamah who was forbidden for one hour to her Yavam remains forbidden to him forever.
c) The Halachah that the Yevamah returns to her original Heter applies only if she was permitted at the time of Nefilah, as the Gemara (27b) states, "Yevamah she'Hutrah v'Ne'esrah v'Chazrah v'Hutrah Tachzor l'Heterah ha'Rishonah." This is only if she was permitted at the beginning, but if she was prohibited at the time of the first Nefilah, she never becomes permitted again.
Dovid Bloom
3) A possible way of answering the contradiction between Rashi on 27b (DH v'Rebbi Yochanan) and Rashi on 28a (DH Bishlama):
a) Avrumi, I think that possibly your question can be expressed as follows. Rashi on 27b (DH v'Rebbi Yochanan) writes that if at the time she fell before him she was permitted, then she stays permitted later on, once an intermediate prohibition goes away. This seems to be opposed to what Rashi on 28a (DH Bishlama) writes, that since she certainly came to him in a prohibited way, she never becomes permitted again, which implies that it all depends on the time that she married him, not on the time that she fell to him for Yibum.
b) The answer may lie in what Tosfos on 23b (DH Kadmu) writes, that if she was Vadai forbidden to him we do not say that if they have already married then we do not separate them. Rebbi Akiva Eiger (in Chidushim to 28a) writes that if we know for sure that he married the sister of his Zekukah -- even though afterwards the Zikah went away -- he must still divorce her. Rebbi Akiva Eiger writes that Rashi learns like Tosfos. That is why Rashi on 28a writes "d'Vadai," just as Tosfos on 23b writes "b'Vadai."
4) Answer to last questions:
With what I wrote above, we now may answer what you wrote that there is a Safek for the first brother as well, because Rashi on 28a (DH Bishlama) stresses that the first woman is forbidden only because she came to him Vadai b'Isura.
Kol Tuv,
Dovid Bloom