"He shall designate her for his son" (Exodus 21:9): one might think it is an obligatory decree; Scripture says "and if" it is only optional. "For his son": and not for his brother. For it would have followed logically: if for the son, for whom the Torah did not acquire a levirate widow, designation is acquired, then for the brother, for whom the Torah did acquire a levirate widow, surely designation should be acquired; Scripture says "for his son" and not for his brother. "He shall designate her for his son": he designates her during his father's lifetime, but he does not designate her after his father's death. "He shall deal with her according to the law of daughters" (Exodus 21:9): now what have we learned about the law of daughters until now? Rather, this is a case of a verse that teaches and turns out itself to be taught. Just as the designated Hebrew maidservant one does not withhold from her food, clothing, and conjugal rights, so too all daughters [wives]. Another interpretation: "according to the law of daughters" just as a daughter whom her father has betrothed one is liable for her by the death penalty of the court [for adultery], and she goes out only by a bill of divorce, [so too a Hebrew maidservant once he has designated her one is liable for her by the death penalty of the court, and she goes out only by a bill of divorce].
If He Designates Her for His Son He Treats Her as a Daughter
Mekhilta DeRabbi Shimon Ben Yochai 21:9
לבנו ייעדנה יכול גזירה ת"ל ואם אינו אלא רשות: לבנו. ולא לאחיו שהיה בדין מה אם הבן שלא קנתה לו תורה יבמה קנתה לו יעידה אח שקנתה לו תורה יבמה אינו דין שתקנה לו יעידה ת"ל לבנו ולא לאחיו: לבנו ייעדנה. בחיי אביו מיעדה ואין מיעדה לאחר מיתת אביו: כמשפט הבנות יעשה לה. וכי מה למדנו למשפט הבנות מעתה אלא הרי זה במלמד נמצא למד מה אמה עברייה היעודה אין מונעין ממנה שאר כסות ועונה כך כל הבנות: ד"א במשפט הבנות מה בת משקדשה אביה חייבין עליה מיתת בית דין ואין יוצאה אלא בגט [אף אמה עבריה משייעדה חייבין עליה מיתת בית דין ואין יוצאה אלא בגט]: