I would like to add some further comments.
As I understand matters, the US tax on the sale of the flat would be reduced if it were occupied as a main residence for at least two years. It seems to me a crucial question as to whether this is possible without thereby becoming a resident of the UK for tax purposes. I am not familiar with the details of the US rules but I would doubt that this would be possible.
It might be possible for the inlaws to move to the UK, establish the required two years for US purposes, then leave the UK to become non-resident again before selling. This would need detailed planning- and a long period.
It should be understood that the UK now has a statutory residence test. It does not require many days of presence in the UK to become a UK resident, especially if the individual is not in full time employment.
There are then the tie break tests for residence under the double tax treaty to consider. Again this would need careful and detailed consideration.
Suppose that the inlaws were UK resident under both UK domestic rules and remained so after applying the double tax treaty. The impact on the tax liabilities in the UK needs to be understood.
If the inlaws were UK resident, then of course their income and gains would be taxable in the UK. The remittance basis for non UK income and gains might not be available (because of the detailed changes applying from 6 April 2017, under which anyone who was previously UK domiciled would be deemed to become so again immediately on resuming residence.) Perhaps more importantly the basis of the calculation of the gain on the sale of the flat would radically change. The starting point is that the whole of the gain would potentially be taxable. There may be a rebasing to 31 March 1982. The main residence relief in the UK operates on a time apportionment basis. This might exempt a small fraction of the gain, based on the final years of occupation. The rate of capital gains tax on residences remains at 28%, notwithstanding the general reduction in the rate to 20%. The result of this might be a much increased UK liability, with a reduced US liability.
Put bluntly, the US planning might work, but increase the overall tax because of increased UK tax.