Sayyiduna Imran bin Husayn (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) said to him, or said to a man while he was listening: "Did you fast any day at the end of this month?" The man said: No, O Messenger of Allah. He (peace and blessings be upon him) said: "When you have broken your fast, then keep two fasts in its place."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 7967
Mahdi bin Maymun narrated this hadith with the same chain, that the Prophet (peace and blessings be upon him) said to a man: "Have you fasted at the end of this month?" He said: No (meaning in Sha'ban). He (peace and blessings be upon him) said: "When you have finished fasting, then fast one day or two days."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 7968
Sayyiduna Imran bin Husayn (may Allah be pleased with him) said that the Prophet (peace and blessings be upon him) said to him or to another person: "Have you fasted at the end of Sha'ban?" He said: No. He (peace and blessings be upon him) said: "When you break your fast, then fast two days."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 7969
Sayyiduna Mu'awiyah (may Allah be pleased with him) said: I heard the Messenger of Allah (peace and blessings be upon him) say: "Fast this month, and on its last day as well."
Al-Walid said: I heard Abu Amr, meaning al-Awza'i, say: Its sirr is its beginning. Sa'id bin Abdul Aziz also used to say: Its sirr is its beginning. The Shaykh said: Others narrated from al-Awza'i that he said: Its sirr is its end, and that is correct. By it is meant the one or two days in which the moon is hidden before the day of doubt; or it means fasting at the end of the month together with the day of doubt, when that coincides with his habit of fasting at the end of every month. It has also been said that by its sirr is meant its middle, since the sirr of everything is its inside; on this view it means the White Days (ayyam al-bid). And Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 7970