Agree with a lot of the advice given.
Person A don't even try to change their role. They are automatically covered by the Equality Act due to having cancer irrespective, whether it impacts them 5 years later plus their adjustments have been in place for several years. Not fair to change their role due to B either.
Person B - may or may not be covered by the Equality Act - it depends on how long they've had their condition, if it's manage with medication, and if so, for how long plus other factors. If had issue for less than 12 months and un-medicated, not likely covered by Equality Act.
You do need a occupational health report plus guidance from employment lawyer. As with what PP have said, adjustments have to something you can accommodate and moving B to a back role does not sound like you can due to lack of work. Regular micro breaks, reduced hours and a well-being action plan or stress risk assessment is what OH will potentially recommend.
Speak to employment lawyer first. OH tend to favour the employee and will suggest adjustments (to the employee and outside of mentioned above) you may not be able to offer.
I would see about terminating B's employment legally. B is clearly in a line of work that does not suit their wellbeing and will become a long-term pain in your ass if kept on.