If stock market profits (from renting and investing) are used to buy a house 20 years later, zero taxes will be paid under Section 54F.
"if you decide to buy a house 20 years later with that stock market profit you will be paying zero taxes as per section 54F."