Hadithcore
Mishkat al-Masabih, 1184, 1185

Makhul, tracing it back, told how God’s Messenger said, “If anyone before engaging in conversation after the sunset prayer prays two <i>rak'as</i> (four <i>rak'as</i> according to another version), his prayer will be taken up to ‘Illiyun.” It is given in <i>mursal</i> form. Hudhaifa has something similar, adding that he used to say, “Hasten the two <i>rak'as</i> after the sunset prayer, for they will be taken up along with the prescribed prayer.” Razin transmitted them both, and Baihaqi transmitted something to the same effect as the addition in <i>Shu'ab al-iman</i>.

وَعَنْ مَكْحُولٍ يَبْلُغُ بِهِ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: «مَنْ صَلَّى بَعْدَ الْمَغْرِبِ قَبْلَ أَنْ يَتَكَلَّمَ رَكْعَتَيْنِ وَفِي رِوَايَةٍ أَرْبَعَ رَكَعَاتٍ رُفِعَتْ صَلَاتُهُ فِي عِلِّيِّينَ» . مُرْسلا وَعَن حُذَيْفَة نَحْوَهُ وَزَادَ فَكَانَ يَقُولُ: «عَجِّلُوا الرَّكْعَتَيْنِ بَعْدَ الْمَغْرِبِ فَإِنَّهُمَا تُرْفَعَانِ مَعَ الْمَكْتُوبَةِ» رَوَاهُمَا رَزِينٌ وَرَوَى الْبَيْهَقِيُّ الزِّيَادَةَ عَنْهُ نَحْوَهَا فِي شُعَبِ الْإِيمَان

References1 variant
In-Book Reference
Book 4, Hadith 601