Ref. No. 1723/43-1410
In the name of Allah the most Grcious the most Merciful
The answer to your question is as follows:
One should not recite the same Surah in both rak'ats in Fard namaz (obligatory prayers). The jurists have considered it disliked (Makrooh Tanzihi). However, there is no problem if this happens by mistake. In any case, there is no need to do sajdae sahw or to repeat the prayer. However, in Nawafil (optional prayers) it is permissible to recite the same surahs in both rak'ahs.
لا بأس أن يقرأ سورةً ويعيدها في الثانية. (قوله: لا بأس أن يقرأ سورةً إلخ ) أفاد أنه يكره تنزيها، وعليه يحمل جزم القنية بالكراهة، ويحمل فعله عليه الصلاة والسلام لذلك على بيان الجواز، هذا إذا لم يضطر، فإن اضطر بأن قرأ في الأولى: {قل أعوذ برب الناس} الناس أعادها في الثانية إن لم يختم، نهر (الدر المختار مع شرحه ردالمحتار (الشامي) (1 / 546)
And Allah knows best
Darul Ifta
Darul Uloom Waqf Deoband