There is an important bit missed out of this, if the house was owned before March 82, the March 82 value if higher should be substituted.
Then this gives the basic gain, ant this is then spread over the number of years.
So bought in 67 £5k, value in 82 £50k sold 17 £350k - rough figures - may not be valid
Gain is £300k which is £6,000 per year
Moved out in 2012 -and let for 5 years
so 45 years for PPR - gives £270k exempt on this
Last 3 years exempt as went straight into care £18k exempt
Leaves a gain of £12k
Less £40k lettings relief means no gain.
If the house had been empty, so no letting relief the there is an annual exemption of £11,100 so there would be a gain of £900.
So it looks like the CGT liability isn't too bad....it is 'effectively' based on the value of the house at the point the person goes into the CH (or 3 years after that date). But the best advice would be to consult a professional (accountant/financial advisor??) to avoid any nasty shocks in the future. It would be awful to create a substantial tax liability when a bit of planning could avoid it.
I presume there are ways to estimate what the property was worth in '82 and perhaps find out what it cost originally?