Draw all three bodies with just the outer diameter or surface so they are solid without any inner hole.

Use the Combine tool to subtract the inner solid from the target outer solid. The solid of interference will be created that you will have to delete.  Repeat this on the other target body.

I don't know how to script in SpaceClaim.