Bereshit / Genesis 23:1 · Remez
וַיִּהְיוּ חַיֵּי שָׂרָה מֵאָה שָׁנָה וְעֶשְׂרִים שָׁנָה וְשֶׁבַע שָׁנִים שְׁנֵי חַיֵּי שָׂרָה׃
And the life of Sarah was one hundred years, and twenty years, and seven years: the years of the life of Sarah.
Remez רֶמֶז
The sun set, the sun rose
At the end of the previous chapter it is said in passing that Rivka was born to Betuel. And at once: "and the life of Sarah was". The Ba'al HaTurim reads this neighbourhood as a law of nature, and in the first letters of the verse finds the word "sun". Ramban meanwhile argues with Rashi.
The Ba'al HaTurim ties our verse to the one before: "Betuel begot Rivka" (Rebecca), and at once "the life of Sarah", for Sarah's sun had not yet set when Rivka's sun rose. The first letters of the words "Sarah a hundred years" (שָׂרָה מֵאָה שָׁנָה) spell "sun" (שֶׁמֶשׁ), as in the verse "and the sun rises, and the sun sets". And the number of the word "and was" (וַיִּהְיוּ), thirty-seven, is Sarah's years from the birth of Yitzchak (Isaac). Ramban does not accept Rashi's reading: of Yishmael (Ishmael) the years are written the same way, and he was wicked at first and repented only at the end, so his years were not equally good. The repeated "years" is simply the way of the language, and the midrash expounds only the extra words "the years of the life of Sarah".
How Kitzur Ba'al HaTurim and Ramban explain it
Kitzur Ba'al HaTurim The life of Sarah
Above it is written: "and Betuel begot Rivka". Sarah's sun had not yet set when Rivka's sun rose.
Sarah a hundred years.
The first letters (שָׂרָה מֵאָה שָׁנָה) spell "sun" (שֶׁמֶשׁ): "and the sun rises, and the sun sets".
The years of the life of Sarah.
It does not say "days", because she returned to the days of youth, and when she grew old again the days of youth ceased for her, therefore it says "years". Another reading: the number of the word "and was" (וַיִּהְיוּ), these are her main years, from the birth of Yitzchak, for she was ninety when he was born, and all her days were a hundred and twenty-seven.
Ramban A hundred years and twenty years
Rashi's words: that is why "years" is written with each number, to tell you that each number is expounded on its own, at a hundred like twenty as regards sin, at twenty like seven in beauty. So he wrote of the years of the life of Avraham too. But this midrash of his is not correct, for of the years of the life of Yishmael it is said exactly as of the years of the life of Avraham, and they were not equal in goodness: at first he was wicked and repented at the end. And further, "years, years" implies division, and is not expounded as making them equal. But "years, years and years" is the way of the language. And what they said in Bereshit Rabbah, "at a hundred like twenty as regards sin", they derived not from this but from the extra words "the years of the life of Sarah", repeated at the end, by which the verse summed up and equalised them all. And of Avraham they do not expound so.
Takeaway
"And Betuel begot Rivka" stands at the very end of the previous chapter, in the list of the sons of Nachor (Bereshit / Genesis 22:23). The Ba'al HaTurim reads the order of the verses as a rule: the Holy One, blessed is He, does not put out the sun of one righteous person before He lights the sun of another (Bereshit Rabbah 58:2).
"And the sun rises, and the sun sets": the words of Kohelet about the cycle of the world (Kohelet / Ecclesiastes 1:5). The first letters of the words "Sarah a hundred years" (שָׂרָה מֵאָה שָׁנָה) are shin (ש), mem (מ), shin (ש), together "sun" (שֶׁמֶשׁ).
The number of the word "and was" (וַיִּהְיוּ): vav (ו) six, yud (י) ten, heh (ה) five, yud (י) ten, vav (ו) six, thirty-seven in all. Sarah bore Yitzchak at ninety (Bereshit / Genesis 17:17) and died at a hundred and twenty-seven, a difference of thirty-seven years.
"Returned to the days of youth": by the midrash Sarah became young again before the birth of Yitzchak (Bereshit Rabbah 48:16). From here the Ba'al HaTurim explains why the verse says "years" and not "days".
Of Avraham's years too it is said "a hundred years, and seventy years, and five years" (Bereshit / Genesis 25:7), and of Yishmael "a hundred years, and thirty years, and seven years" (Bereshit / Genesis 25:17). Ramban sets these three verses side by side and from the third concludes that the repeated "years" expounds nothing.
Yishmael's repentance: by the words of Rabbi Yochanan, Yishmael repented while his father was still alive, for at Avraham's burial Yitzchak is named before him (Bava Batra 16b). Ramban relies on this tradition.