Tell me, newbie here.
How long the bitcoin will maintain its leading position in terms of capitalization?
No one can say with certainty, it could be within this year or it could be never. My guess is ETH will take over within the next 2 years.
What happens if it is overtaken by ETH or XRP?
Will this mean that the exchange will change the currency pair and altcoins will be traded with another currency, which will occupy the first place among all the others?
Most exchanges already offer ETH/ALT pairs as well as BTC/ALT pairs. I don't think that anything else will change, certainly not in a short time. If for example BTC fell very low and many alts overtook it then I think there may be other pairs added.