Abd al-Rahman bin Abi Layla (may Allah have mercy on him) says: The Companions of Muhammad (peace and blessings be upon him) narrated to us that fasting was prescribed in three stages. The people came to Madinah and had no obligatory fast, so they used to fast three days every month, until the month of Ramadan was made obligatory; they found it a great deal and it was hard upon them. So whoever was able would feed a poor person every day and not fast; they had been given a concession in this, and then it was abrogated by this verse: "And that you fast is better for you, if only you knew" [Surah al-Baqarah: 184]. The narrator says: So they were commanded to fast.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 7894
Sayyiduna Mu'adh bin Jabal (may Allah be pleased with him) says that Ramadan was made obligatory in three stages; then he narrated the whole hadith. He said: As for the stage of fasting, the Messenger of Allah (peace and blessings be upon him) fasted after coming to Madinah; he (peace and blessings be upon him) began fasting three days every month and also fasted Ashura, and he fasted (in this way) for seventeen months, from (the month of) Rabi' to Rabi', up to Ramadan. Then Allah made the month of Ramadan obligatory upon him and revealed this command: "Fasting has been prescribed for you as it was prescribed for those before you" [Surah al-Baqarah: 183].
This report is mursal; Abd al-Rahman (bin Abi Layla) did not meet Mu'adh bin Jabal.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 7895