In Perek כד Pasuk א of this week's parsha, it says ואברהם זקן בא בימים, "And Avraham was old, advanced in age, and Hashem blessed Avraham with everything." It seems strange that the Pasuk would say בא בימים. It just said that he is old; obviously he is advanced in age. What is the significance of these two words?
There are three other times in Tanach that the words בא בימים are used. One time, not coincidentally, is in this week's Haftorah from מלכים א פרק א פסוק א, where it says והמלך דוד זקן בא בימים..., "King David was old, advanced in age, and they (his servants) gave him clothes, but he was not warmed." This Pasuk starts with the same phrase as our first Pasuk, yet in the first Pasuk we read about something positive happening to Avraham, he was blessed; but in the second Pasuk we read about something negative happening to David, he was not warmed by the clothes given to him. Why does Avraham get blessed when he was בא בימים but David suffered physical pain? Weren't they both great צדיקים?
To answer this question, we must look at the two other times in Tanach that בא בימים is mentioned. In יהושע פרק יג פסוק א it says ויהושע זקן בא בימים..., "And Yehoshua was old, advanced in age, and Hashem said to him, you are old, advanced in age, and there is still a lot of land that needs to be conquered." Why does Hashem have to tell Yehoshua, "you are old?" Doesn't Yehoshua already know that he is old? We'll come back to this question later. The second time in Yehoshua that it says בא בימים is in פרק כג פסוקים א-ב where it says
ויהושע זקן בא בימים, ויקרא יהושע לכל ישראל... ויאמר אליהם אני זקנתי "And Yehoshua was old advanced in age, and he called Israel...and said to them 'I am old, advanced in age.'" We already knew from before that Yehoshua was old in age, and why is it that in פרק יג Hashem told Yehoshua "you are old", and here, Yehoshua tells Bnei Yisrael, "I am old." The first time in ספר יהושע that it says בא בימים, Hashem is telling Yehoshua that he is old and he has so much to accomplish, "Why haven't you done it yet? There are many nations throughout Canaan that have to be conquered, what are you waiting for?" Ten Perakim later, however, Yehoshua had accomplished this. His responsibility in life was completed, and that is why he said אני זקנתי באתי בימים. He had done everything that he had to, and was ready to face death.
But how does this issue with Yehoshua relate to David and Avraham? David is compared to the first time it says בא בימים by Yehoshua. Like Yehoshua, David had not yet accomplished everything that he was supposed to. The rest of that perek talks about David proclaiming Shlomo to be the next true king of Israel. But why does it say about David ויכסהו בבגדים ולא יחם לו, and the next couple of Pesukim it talks about how אבישג השונמית was brought in to help warm David? This was to atone for David's three sins. The first sin was when he ripped Shaul's clothes. He mistreated clothes, and therefore was punished when his clothes did not keep him warm. His second was with Batsheva. Avishag was brought in to warm David, but if he could avoid being pleasured by her the way he was with Batsheva, it would be the biggest form of Teshuva. His third sin was when he took advantage of his power as king by counting Bnai Yisrael. A king controls a whole nation, but here, he did not even have control over his own body. After this, David did Teshuva, and had accomplished everything he needed to at the time of his death.
Avraham is compared to the second time it says בא בימים by Yehoshua. Avraham had accomplished everything he had to. He had just secured מערת המכפלה, in Chevron as the burial place for Sarah who had just died, and later for himself, Yitzchak, Rivka, Yaakov, and Leah. We can also see through this the importance of the city of Chevron and how once Avraham had secured it, he has accomplished everything.
There is one other difference between Avraham and David when they were בא בימים. Rashi points out that בכל in Gematria is 25, and בן in Gematria is also 25. The Pasuk really means that Hashem blessed Avraham with a son. The first of David's sons mentioned in Sefer Melachim is אדניה. אדניה rebelled and tried to take the kingdom from Shlomo, the rightful heir, before David even died. אדניה in Gematria is 07. David was 07 when these events took place, and when he died. Avraham was blessed with a son, Yitzchak, who would be the second of the Avot. The rest of the Perek talks about Eliezer, Avraham's servant finding a wife for Yitzchak and at the end of the Perek it says וינחם יצחק אחרי אמו - and Yitzchak was consoled after the death of his mother. Yitzchak was ready to move on, and become a great leader, while אדניה rebelled.