وَمَنْ تَلَا آيَةَ سَجْدَةٍ خَارِجَ الصَّلَاةِ وَلَمْ يَسْجُدْهَا، حَتَّى دَخَلَ فِي الصَّلَاةِ فَتَلَاهَا، وَسَجَدَ لَهَا: أَجْزَأَتْهُ السَّجْدَةُ عَنِ التِّلَاوَتَيْنِ.
Translation: If someone recites a prostration verse outside prayer without prostrating, then recites it in prayer and prostrates for it, that one prostration suffices for both recitations.
The obligation arising from the earlier recitation had not yet been discharged; it is fulfilled together with the later occurrence.