You need to contact a good tax adviser for the following reasons.... and this won't come cheap.
Firstly, the Revenue will only allow this if it satisfies the "trade Benefit" test. However, they will give you an opinion on this prior to the transaction.
Secondly, the person exiting most reduce their shareholding to less than 30% of their original shareholding to qualify for the relief. The problem here is that "connected persons" are also included in this definition. i.e. Spouse etc.
Thirdly, the relief is also only available on chargeable assets and a formula will calculate this percentage based on the company's balance sheet.
Numerous other issues as well, but just giving you some of the reasons why this is not a "DIY" exercise.