Yevamos3: 5
שְׁלֹשָׁה אַחִין, שְׁנַיִם מֵהֶם נְשׂוּאִים שְׁתֵּי אֲחָיוֹת, וְאֶחָד מֻפְנֶה, מֵת אֶחָד מִבַּעֲלֵי אֲחָיוֹת, וְעָשָׂה בָהּ מֻפְנֶה מַאֲמָר, וְאַחַר כָּךְ מֵת אָחִיו הַשֵּׁנִי — בֵּית שַׁמַּאי אוֹמְרִים: אִשְׁתּוֹ עִמּוֹ, וְהַלָּה תֵצֵא מִשּׁוּם אֲחוֹת אִשָּׁה. וּבֵית הִלֵּל אוֹמְרִים: מוֹצִיא אֶת אִשְׁתּוֹ בְּגֵט וּבַחֲלִיצָה, וְאֵשֶׁת אָחִיו בַּחֲלִיצָה. זוֹ הִיא שֶׁאָמְרוּ: ,,אוֹי לוֹ עַל אִשְׁתּוֹ וְאוֹי לוֹ עַל אֵשֶׁת אָחִיו”.
[If there were] three brothers, [and] two of them were married to two sisters, while one was unmarried; [if] the husband of one of the sisters died, and the unmarried one performed maamar with her, and then his second brother died —- Beis Shammai say: His wife [remains] with him, while the other is discharged as his wife's sister; but Beis Hillel say: He must send away his wife with [both] a divorce and chalitzah, and his brother's wife with chalitzah. About this it was said, “Woe unto him concerning his wife, and woe unto him concerning his brother's wife.”
Yevamos3: 6
שְׁלֹשָׁה אַחִין, שְׁנַיִם מֵהֶן נְשׂוּאִים שְׁתֵּי אֲחָיוֹת, וְאֶחָד נָשׂוּי נָכְרִית, מֵת אֶחָד מִבַּעֲלֵי אֲחָיוֹת, וְכָנַס נָשׂוּי נָכְרִית אֶת אִשְׁתּוֹ, וָמֵת — הָרִאשׁוֹנָה יוֹצְאָה מִשּׁוּם אֲחוֹת אִשָּׁה, וּשְׁנִיָּה מִשּׁוּם צָרָתָהּ. עָשָׂה בָהּ מַאֲמָר, וָמֵת — נָכְרִית חוֹלֶצֶת וְלֹא מִתְיַבֶּמֶת.  שְׁלֹשָׁה אַחִים, שְׁנַיִם מֵהֶם נְשׂוּאִים שְׁתֵּי אֲחָיוֹת, וְאֶחָד נָשׂוּי נָכְרִית, מֵת הַנָּשׂוּי נָכְרִית, וְכָנַס אֶחָד מִבַּעֲלֵי אֲחָיוֹת אֶת אִשְׁתּוֹ, וָמֵת — הָרִאשׁוֹנָה יוֹצְאָה מִשּׁוּם אֲחוֹת אִשָּׁה, וּשְׁנִיָּה מִשּׁוּם צָרָתָהּ. עָשָׂה בָהּ מַאֲמָר, וָמֵת — נָכְרִית חוֹלֶצֶת וְלֹא מִתְיַבֶּמֶת.
[If there were] three brothers, [and] two of them were married to two sisters, while one was married to a stranger; [if] the husband of one of the sisters died, and the one married to the stranger married his wife and [then] died —- the first one is discharged as [his] wife's sister, and the second as her co-wife. [If] he performed maamar with her and then died —- the stranger requires chalitzah but may not be taken in yibum.  [If there were] three brothers, [and] two of them were married to two sisters, while one was married to a stranger; [if] the one married to the stranger died, and the husband of one of the sisters married his wife and [then] died —- the first one is discharged as [his] wife's sister, and the second as her co-wife. [If] he performed maamar with her and then died —- the stranger requires chalitzah, but may not be taken in yibum.