Because person A has techincally made a capital gain, are they liable for capital gains tax even though they owe the money to peson B?
I think you're overthinking this. What 'gain'. B has given a gift of 90k to A. (A happens to pay off mortgage - so what?)
B lends A 160k. A later pays this back.
At some point A buys a new house with a mortgage and sells his old house.
As long as the houses are A's primary residence then Capital Gains won't apply.
I don't think having a mortgage is of any interest to the taxman since tax relief on them was abolished. (OTOH the mortgage supplier (bank, b/s, etc) will probably have to pay tax on the profit they make from you in interest; but that's not your problem.)
The gift might be taxable under some rule, but if it's 'in the family' I'd very much doubt it except for the 7 year rule as mentioned.
If A pays B interest on the loan then B may have to pay income tax on the interest he receives (unless his total income is less than his tax free allowance).
So provided your parents don't pay you interest I can't see the taxman having any interest - except for the usual house moving expenses like stamp duty, VAT, etc.