Use a sleeve wherever you connect and to cast iron.
Cut cast pipe , sleeve together existing cast iron pipe and ABS.
https://www.amazon.com/Fernco-Flexible-Coupling-Plumbing-Connections/dp/B0BFBYR39Z[https://www.amazon.com/Fernco-Flexible-Coupling-Plumbing-Connections/dp/B0BFBYR39Z](https://www.amazon.com/Fernco-Flexible-Coupling-Plumbing-Connections/dp/B0BFBYR39Z)