Answer

How to perform qaza namaz of 20 years or may be 30 years?

Bismi-l-Lāhi-r-Raḥmāni-r-Raḥīm

According to the relied-upon position in the Shafiʿi maḍhab, anyone who missed prayers without a valid excuse must spend all of their free time making up their missed prayers. Free time is time that is not spent on essential things like earning a living, sleeping, eating, or performing another obligation that cannot be delayed.

If one is not sure how many prayers they've missed, they should do their best to determine the number of prayers they've missed and they must make up every prayer that they are uncertain about having performed.[1] There is a more lenient opinion that one must only make up the prayers that one is certain they've missed.[2]

The erudite scholar and mufti, Sayyid Abdur-Raḥmān al-Mashhūr followed up with the following,

"From the words of the ḥabīb and quṭb, Abdullah al-Ḥaddād: It is imperative on the one who repents to make up the obligatory payers that he neglected, and it should be done in a loose and flexible manner, according to the person's capability, without being [overly] restricting or careless, because the religion is firm. He (ṣalla-l-Lāhu ʿalaihi wa sallam) said: I have been sent with the true and tolerant religion. And he (ṣalla-l-Lāhu ʿalaihi wa sallam) said: Make things easy, and do not make things difficult.

This, as you can see, is better than what the jurists have said because of the extreme difficulty it entails." [3]

Allah knows best.

Answered by Shaykh Omar Mohsin

[1]This opinion is held by both ibn Ḥajar and al-Ramlī. Tuḥfa al-Muḥtāj v1p440 
[2] This opinion is held by al-Qaffāl. Fatāwa al-Kurdī p59
[3] al-Mashhūr, Bughyat al-Mustarshidīn,v2p51,Dar al-Faqīh