In this case I would definitely suggest seeing a tax specialist or a least an accountant.
If you want to understand a bit look up CGT rules particularly business and/or farm relief and also the CGT rules on PPR (principal private residence).
Nobody on here should really tell you how to structure such a transaction without full facts.
If you want to discuss this further click on my username for my practice website.
Edit: whether it be us or someone else please do go see someone as this is a very significant issue.