"And it came to pass at the turn of the seasons" (1 Samuel 1:20) — after two seasons "Hannah conceived." "And the man Elkanah went up" (1 Samuel 1:21), "but Hannah did not go up" (1 Samuel 1:22). The teaching of Rabbi Levi is reversed here. There Rabbi Abba the son of Rav Papi and Rabbi Yehoshua of Sikhnin said in the name of Rabbi Levi: "In all toil there is profit" (Proverbs 14:23) — Hannah, because she multiplied her prayer, shortened the days of Samuel, for she said "and he shall dwell there forever" (1 Samuel 1:22), and the "forever" of the Levites is only fifty years. This is what is written: "And from fifty years old he shall return" (Numbers 8:25). But behold, they are fifty-two! Rabbi Yose bar Rabbi Avin said: The two years during which she nursed him are not counted in the reckoning.
Hannah's Prayer and the Shortened Years of Samuel the Prophet
Midrash Shmuel 3:3
ויהי לתקופות. לאחר שתי תקופות. ותהר חנה, ויעל האיש אלקנה וגו', וחנה לא עלתה וגו' מחלפה שיטתיה דרבי לוי, תמן אמר רבי אבא בריה דרב פפי ורבי יהושע דסכנין בשם רבי לוי בכל עצב יהיה מותר וגו' (משלי י"ד כ"ג), חנה על ידי שרבתה בתפלתה קצרה ימיו של שמואל, שאמרה וישב שם עד עולם, אין עולמן של לוים אלא חמשים שנה, הדא הוא דכתיב ומבן חמשים שנה ישוב וגו' (במדבר ח' כ"ה), והא אינון חמשין ותרתין, אמר רבי יוסי בר רבי אבין שתים שגמלתו אינן מן המנין.