As far as the Lancaster was concerned, I believe the hard work had already been done by Bristol. Given that the Merlin installation used on the Lanc was taken from the Beaufighter II, the Lancaster II Hercules installation was presumably effectively a reversal of the mods made to the Beaufighter to install the Merlin.
The idea, I believe, was to give an option in the case of an engine supply shortage (which due to the addition of the Packard Merlin source never materialised).