The Prophet صلى الله عليه وسلَّم fasted the 10th of Muharram and then said: if I lived next year I will fast the 9th. He, صلى الله عليه وسلَّم , however, died before he could fast the 9th.
As you know, the Prophet صلى الله عليه وسلم fasted and encouraged the Muslims to fast the 10th after he learned that the Jews fasted this day for thanking Allah for saving them from Pharaoh when they left Egypt with Prophet Musaa, صلى الله عليه وسلم. The Prophet, صلىًالله عليه وسلم, then said: we are more deserving to recognize Prophet Musaa.
Also, fasting the 9th distinguishes the Muslims’ fasting from that of the Jews. In this way, Muslims do not fast their fast.
Fasting the 11th came as a result of the the Muslim scholars’ ijtihaad which concluded that the fasting of this day is in compliance with the Prophet’s Sunnah. However, it is not the original Sunnah which included only the 9th and the 10th as mentioned above.