Bishr bin Bakr (may Allah have mercy on him) said: Al-Awza'i (may Allah have mercy on him) narrated the hadith to me through both chains, and at its beginning he said: 'Allahummaghfir li-awwalina wa akhirina wa hayyina wa mayyitina' (O Allah, forgive the first of us and the last of us, our living and our dead.)
This is the correct version: the hadith of Abu Ibrahim al-Ashhali is mawsul (connected), and the hadith of Abu Salamah is mursal.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6970