Would cut off where comes in the wall and replace cast-iron and 3 inch line headed to toilet change out drum trap but there’s going to be an issue with the drain on either shower or tub however that is connected as it is not up to code. This does not include cutting out cast-iron going to toilet as there’s no way to hold cast-iron going up through the roof for the vent to keep from falling down. Cut out three-quarter inch waterline and repair so it doesn’t leak.