This is not an easy first plumbing repair. I believe you'll need an internal pipe cutter to cut out the PVC pipe past the point where it is broken. Then you'll need to glue an extension piece with a new flange attached. The flange needs to be level with whatever new floor you are putting in. As far as the black roots, Why don't you post a photo. You may have had a toilet leak, and this is some nasty black mold. Wear a dust mask and gloves when handling it.