The first verse reads
וַיִּהְיוּ חַיֵּי שָׂרָה מֵאָה שָׁנָה וְעֶשְׂרִים שָׁנָה וְשֶׁבַע שָׁנִים שְׁנֵי חַיֵּי שָׂרָה
And the life of Sarah was a hundred and seven and twenty years; these were the years of the life of Sarah (Gen. xxiii.i).The very well known comment on this verse appears in Rashi's commentary:
ויהיו חיי שרה מאה שנה ועשרים שנה ושבע שנים - לכך נכתב שנה בכל כלל וכלל, לומר לך שכל אחד נדרש לעצמו, בת מאה כבת עשרים לחטא, מה בת עשרים לא חטאה, שהרי אינה בת עונשין, אף בת מאה בלא חטא, ובת עשרים כבת שבע ליופי
(Judaica Press translation from here).
Indeed, Genesis Rabbah reads
ויהיו חיי שרה מאה שנה (תהלים לז) יודע ה' ימי תמימים ונחלתם לעולם תהיה כשם שהן תמימים כך שנותם תמימים, בת כ' כבת ז' לנוי, בת ק' כבת עשרים שנה לחטא
Modern Orthodoxers and children of little faith have wondered, for decades at least, at this exegesis. It would seem to them that beauty is the more noticeable characteristic of twenty year old women than seven year old girls, while innocence most properly characterizes seven year olds over twenty year olds. A lot can happen in thirteen years.
Shadal commented:
כלל שאתר הפרט (נתיבות השלום) ; ונ"ל כי טעות נפלה בלשון המדרש שהביא רש"י וצריך לומר בת ק' כבת כ' לנוי בת כ' כבת ז' לחטא, ומפני שמצא רש"י הנוסחא הפוכה (כבת כ' לחטא כבת ז' לנוי) נדחק לפרש שאינה בת עונשין והמילות הללו אינן במדרש. ואח"כ מצאתי כדברי בפירוש קדמון כ"י על בראשית רבא הנמצא בקובץ היקר הכולל פי' סי יצירה לר"י ברצלוני, אחוזת הגבירים היקרים בני המנוח משה אריה טריאסטי ז"ל, וכן כתוב בו : היה לו לומר מאה ועשרים ושבע שנה, אלא כך הוא אומר בת מאה כבת עשרים לנו
In my opinion, an error fell into the language of the midrash that Rashi cited [Bereshit Rabbah 58], and it ought to say, "When she was a hundred, she was like twenty in regard to beauty; when she was twenty, she was like seven in regard to sin." But since Rashi found the text reversed ("like twenty in regard to sin, like seven in regard to beauty"), he was forced to explain that [at age twenty] she had not yet reached the age of responsibility, and these words are not in the midrash.
I have since found an explanation similar to mine in an ancient commentary in manuscript on Bereshit Rabbah, which is found in the precious collection that also includes a commentary on the Sefer Yetsirah by Rabbi Y. Barceloni, in the possession of those beloved masters, the sons of the late Moses Aryeh Trieste. This is what it says: "The text should have said me'ah ve-esrim ve-sheva shanah ["one hundred twenty-seven years"], but this is how it says it: [me'ah shanah ve-esrim shanah ve-shevah shanim, lit. "one hundred years and twenty years and seven years," meaning] when she was a hundred, she was like twenty in regards to beauty." (elegant and accurate trans. by the intrepid Shadal scholar Dan Klein.)
In his critical edition of Rashi on the Torah, R. Abraham Berliner is inclined to agree that the the emended version is preferable--or at least he cites it in his footnote (link). He refers the reader to Shadal, but also Yalkut Tehillim 37, which actually reads this way:
ודע ה' ימי תמימים כשם שהם תמימים כך שנותיהם תמימים, בת ק' כבת כ' לנוי, בת עשרים כבת שבע לחטא
Note that Genesis Rabbah is an exegesis of Psalm 37 as well. Thus, we have two conflicting readings. Assuming one is an error (as opposed to these being two independent exegeses), might it not be the one that raises questions?
Rabbi Hertz has "the rabbis" interpreting the verse according to the emended version (well, the Yalkut's version, which is not emended. He simply doesn't mention Rashi here.). It then informs the reader that 'This, according to Luzzatto and Berliner, was the original form of the saying.' Thus, two kinds of readers are addressed. Those who are unfamiliar with Gen. Rabbah or even Rashi's comment are given the smoother reading. Those who would be thinking "That's not what Rashi said!" are informed the yichus of the version presented in this commentary.