Complex sentence: He acted as a scribe of Muhammad, writing letters for him and following the demise of Muhammad, he was one of the twenty five or so people who knew the Qur'an completely by heart.
Split into simpler sentences: He acted as a scribe of Muhammad, writing letters for him. Following Muhammad's death, he was one of the twenty five people who knew the Qur'an completely by heart.