When did the Prophet (blessings and peace of Allah be upon him) come to know that the Jews fasted on 'Ashura?
Question

Did the Messenger (blessings and peace of Allah be upon him) not come to know that the Jews fasted on 'Ashura except in his final year, because he (blessings and peace of Allah be upon him) said: “If I live until next year, I will surely fast the ninth day [of Muharram] too”? (Narrated by Muslim).
Praise be to Allah.The Messenger (blessings and peace of Allah be upon him) fasted 'Ashura the first year he came to Madinah, and he continued to do so. Then in the last year of his life, he (blessings and peace of Allah be upon him) wanted to differ from the Jews by fasting the ninth day along with the tenth. The hadiths that were narrated about fasting 'Ashura indicate that.
It was narrated that Ibn ‘Abbas (may Allah be pleased with him) said: The Prophet (blessings and peace of Allah be upon him) came to Madinah and saw the Jews fasting on the day of ‘Ashoora. He said: “What is this?” They said: This is a good day; it is the day on which Allah saved the Children of Israel from their enemy, so Moosaa fasted on this day. He said: “We have more right to Moosaa than you.” So he fasted on this day and issued instructions that a fast was to be observed on this day. Narrated by al-Bukhaari (2004).
It was also narrated that Ibn ‘Abbas (may Allah be pleased with him) said: When the Messenger of Allah (blessings and peace of Allah be upon him) fasted on the day of 'Ashura, and issued instructions that a fast was to be observed on this day, they said: O Messenger of Allah, it is a day that is venerated by the Jews and Christians. The Messenger of Allah (blessings and peace of Allah be upon him) said: “Next year, if Allah wills, we will fast on the ninth day too.” But before the next year came, the Messenger of Allah (blessings and peace of Allah be upon him) passed away. Narrated by Muslim (1134)
Ibn al-Qayyim (may Allah have mercy on him) said: This indicates that he fasted on this day and issued instructions that this fast be observed, one year before he died, and that what he said earlier about it was when he first came to Madinah."(Zaad al-Ma‘aad  2/67)
He also said concerning the second hadith of Ibn ‘Abbas (2/81):
Undoubtedly this was at the end of the matter; in the beginning, he liked to do the same as the People of the Book in matters concerning which he had received no divine instructions. End quote.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
Then when it was said to him, shortly before he died, that it was a day that was venerated by the Jews and the Christians, he gave instructions to differ from them by adding another day to it, and he resolved to do that."(Iqtida’ as-Siraat al-Mustaqeem  1/87)
And Allah knows best.