What is written above the matter? "And Isaac came from the way of Beer-lahai-roi" (Genesis 24:62), and afterward, "And Abraham took another wife" (Genesis 25:1). Rather, at the time when Isaac took Rebekah, Isaac said: Let us go and bring a wife for my father. She is Hagar, she is Keturah — the words of Rabbi. But our Rabbis say: he took another wife. What is Rabbi's reasoning? She is Hagar, she is Keturah — for it is written, "And Isaac came from the way of Beer-lahai-roi," that same one of whom it is written, "Therefore the well was called Beer-lahai-roi" (Genesis 16:14).
Did Abraham Remarry Hagar as Keturah After Sarah's Death
Midrash Tanchuma Buber, Chayei Sara 9:1
מה כתיב למעלה מן הענין, ויצחק בא מבוא באר לחי רואי (בראשית כד סב), ואח"כ ויוסף אברהם ויקח אשה, אלא בשעה שנטל יצחק לרבקה אמר יצחק נלך ונביא לאבי אשה, היא הגר היא קטורה, דברי רבי, ורבותינו אומרים אשה אחרת נטל, מה טעמו של רבי, היא הגר היא קטורה, שכתיב ויצחק בא מבוא באר לחי רואי, אותה שכתיב בה על כן קרא לבאר באר לחי רואי (שם טז יד).