We can help you with this, but I would need a bit more information.
The AQD 40s came with a few different transmissions. The early ones came
with a Borg Warner Gear, then Volvo Penta supplied them with their MS3, MS4 or,
on some of the later engines, MS5 gears.
Then some people had ZF63 gears put on them. And then some people swapped
out the Volvo MS series transmission with the Volvo HS1A transmissions.
Most of these are still available, but the ZF63A gears is the least expensive (around
$3,000 each). It might take a little moving of the engines though.
Please feel free to contact me and we can discuss your options.
By the way the 40s are good solid engine. You do need to make sure they
keep cool however as their heads sometime crack quickly if they get hot.