What to Do If You Remember Missed Prayer during the Current Prayer?
Question

My question is about the missed prayer. If I for example pray the Maghrib of today then remembered that my Fajr prayer of the last week was invalid, like if I passed wind during the prayer. If at that time I just doubted it but afterwards I felt it was sure that I passed wind, or that my wudu was incomplete, like if I remember that there was something was on my foot while I was making wudu for this Salah and I did not remove it! Is it permissible to repeat the missed prayer after I finish praying the Maghrib of today then I repeat the Maghrib again as Fajr normally comes before Maghrib? Or it is appropriate to just repeat the missed prayer without repeating the current one, as the missed Fajr was of another day?.
Praise be to Allah.What to do if you remember a missed prayer after finishing the current prayer? 
If you have prayed the current prayer, then you remember a missed prayer from the same day or a previous day, you should pray it , but do not repeat the current prayer. Prophet Muhammad (peace and blessings of Allah be upon him) said: “Whoever forgets a prayer, let him offer it as soon as he remembers, for there is no expiation for it other than that. {and establish prayer for My remembrance} [Ta-Ha 20:14].” (Narrated by Al-Bukhari, 597 and Muslim, 684)
An-Nawawi (may Allah have mercy on him) said: “The words of the Prophet (peace and blessings of Allah be upon him), “Whoever forgets a prayer , let him offer it as soon as he remembers, for there is no expiation for it other than that” mean: nothing will make up for it except a prayer like it, and he does not have to do anything else. (End quote) 
Based on this, then in the case asked about here, you have to pray Fajr as soon as you remember it, and do not repeat Maghrib .  
What to do if you remember missed prayer during the current prayer? 
But if a person remembers a missed prayer during the current prayer, should he complete it or interrupt it? There is a difference of opinion among the jurists. 
Abu Hanifah and Malik were of the view that the current prayer becomes invalid, so he should offer the missed prayer first and then the current prayer. The Shafi`is were of the view that he should complete the current prayer and then offer the missed the prayer, and it is recommended for him to repeat the current prayer. Ahmad was of the view that he should complete the current prayer, then make up the missed prayer, then repeat the current prayer as something obligatory. 
This has been discussed in the answer to question no. 30788 , where we stated that repeating the current prayer is better, in order to be on the safe side. 
And Allah knows best.