Yevamos10: 8
בֶּן תֵּשַׁע שָׁנִים וְיוֹם אֶחָד שֶׁבָּא עַל יְבִמְתּוֹ, וְאַחַר כָּךְ בָּא עַל צָרָתָהּ — פָּסַל עַל יְדֵי עַצְמוֹ. רַבִּי שִׁמְעוֹן אוֹמֵר: לֹא פָסַל.  בֶּן תֵשַׁע שָׁנִים וְיוֹם אֶחָד שֶׁבָּא עַל יְבִמְתּוֹ, וָמֵת — חוֹלֶצֶת וְלֹא מִתְיַבֶּמֶת. נָשָׂא אִשָּׁה וָמֵת — הֲרֵי זוֹ פְּטוּרָה.
A [boy] nine years and one day old who cohabited with his yevamah, and then cohabited with her co-wife —- he has disqualified [them] to himself. R' Shimon says: He did not disqualify.  [If] a [boy] nine years and one day old cohabited with his yevamah and [then] died, she performs chalitzah, but may not be taken in yibum. [If] he married a woman and [then] died, she is exempt.
Yevamos10: 9
בֶּן תֵּשַׁע שָׁנִים וְיוֹם אֶחָד שֶׁבָּא עַל יְבִמְתּוֹ, וּמִשֶּׁהִגְדִּיל נָשָׂא אִשָּׁה אַחֶרֶת וָמֵת, אִם לֹא יָדַע אֶת הָרִאשׁוֹנָה מִשֶּׁהִגְדִּיל — הָרִאשׁוֹנָה חוֹלֶצֶת וְלֹא מִתְיַבֶּמֶת, וְהַשְּׁנִיָּה אוֹ חוֹלֶצֶת אוֹ מִתְיַבֶּמֶת. רַבִּי שִׁמְעוֹן אוֹמֵר: מְיַבֵּם לְאֵיזוֹ שֶׁיִּרְצֶה, וְחוֹלֵץ לַשְּׁנִיָּה.  אֶחָד שֶׁהוּא בֶן תֵּשַׁע שָׁנִים וְיוֹם אֶחָד, וְאֶחָד שֶׁהוּא בֶן עֶשְׂרִים שָׁנָה שֶׁלֹּא הֵבִיא שְׁתֵּי שְׂעָרוֹת.
A [boy] nine years and one day old who cohabited with his yevamah, and [then,] after reaching adulthood, [he] married another woman, and died —- if he was not intimate with the first one after reaching adulthood, the first one performs chalitzah but may not be taken in yibum, while the second one may either perform chalitzah or be taken in yibum. R' Shimon says: He may perform yibum with whichever he prefers, and must [then] perform chalitzah with the other one.  [It is] the same whether he is aged nine years and one day or aged twenty and has not grown two hairs.