Hello, I am Keith, one of the experts on Just Answer, and pleased to be able to help you with your question.
The Capital Gains Tax (CGT) legislation is quite clear; it says 'your sole or main domestic residence.' HMRC would love it to be 'and' not 'or' and indeed often try to interpret it along these lines. Presuming that when you acquired the flat you did not elect to which residence you wish Private Residence Relief (PRR) to apply then HMRC will base the entitlement on the facts. From the scenario in your question this will be the house. Accordingly PRR will apply which relieves the CGT at 100%. PRR is extended for 18 months after you vacate as you are deemed to be resident even if this is not the case so providing you are selling within that time frame there will be CGT on any gain made, but relieved at 100%. Many people do not realise that when they sell their house they are liable for CGT, but PRR applies and PRR is given automatically; it does not have to be claimed.
I do hope my reply has been able to set your mind at rest on this matter. Of course, when you dispose of the flat that is an entirely different kettle of fish!
PRR is, as I explained, Private Residence Relief.
No, you will not pay CGT on the sale of the house, it is your sole or main domestic residence, providing you sell within 18 months of vacation. If you exceed this envelope then you will become liable to CGT, but only for a tiny proportion of the gain which your Annual Exempt Amount (AEA) of 11.1K will probably cover.
It really does not make a halfpenny's worth of difference which residence you sell first.
Further follow up queries covered in telephone call.