Sawzaw blade and make notches in the hub on the outside of the pipe. Make sure you don't cut into the pipe inside the hub. Use some heat to soften the pvc and pry the hub off. Be carful not to over heat or you will have a bigger repair on your hands. Get a new flange and glue down. Now after reading this please relize that this is not an easy repair and go and call an experienced licensed plumber and get it done the right way by cutting it and using a coupling and new pipe and flange.