Sarah miraculously gave birth to Yitzchak when she was ninety years old as God had previously promised Avraham. Yitzchak was the first baby to enter the covenant of the Jewish people when he had his Brit Milah at eight days old. When Yitzchak was weaned at approximately age two, Avraham made a big party.
On the day of the party the pasuk states (Breisheet 21:9) “Sarah saw that the son of Hagar, the Egyptian that she had born to Avraham (Yishmael), was mocking”. The pasuk does not elaborate on what this mocking was.
The next pasuk (21:10) continues “Sarah said to Avraham: Drive out this slave-woman and her son (Yishmael), for the son of this slave-woman will not inherit with my son, with Yitzchak”.
Since Sarah mentioned the inheritance, we are led to believe that Yishmael may have said something about how he rather than Yitzchak will be the true inheritor.
According to Sforno, Yishmael went around gossiping that it was Avimelech (King of Gerar), not Avraham who was Yitzchak’s father. Yishmael probably heard these rumors from Hagar who was trying to invalidate Yitzchak’s inheritance. Therefore Sarah said “Drive out the slave women and her son.for he will not inherit.”
In psukim 11-13 we read: “The thing was very wrong in the eyes of Avraham on account of his son. God said to Avraham, .Do not consider this wrong in your eyes on account of the boy and the slave-woman. Regarding all that Sarah tells you listen to her, for in Yitzchak shall your seed be called. The son of the slave-woman I will also make into a nation, for he is of your seed’.”
According to Radak, Avraham who had helped so many people get on the right path felt bad that he couldn’t help his own son Yishmael and had to send him away. God told Avraham to listen to Sarah. According to Rashi, Sarah actually had more prophecy than Avraham.
According to Chizkuni, Breisheet 17:20, The true inheritor of the land of Israel could only be the son of both Avraham and Sarah (Yitzchak) and not the son of Avraham and Hagar (Yishmael). Yishmael would become a nation as well, but the land of Israel will eternally belong to the descendents of Yitzchak, the Jewish people.