Hi,
Capital Gain will be calculated for actual sale proceeds i.e Rs 50 Lakhs
and as you are planning to invest in buying a house, you can claim capital gain exemption. for whole capital gain amount.
i would suggest buyer should also register sale deed for rs50 lakhs. otherwise he will be in a loss at the time of reselling the flat, as his cost of acquisition will be Rs 6 Lakhs.