Certified GKH Gardening Expert
You can cut this off and plant it as it should be into some new cactus potting mix. You don't have to worry about those roots. They are too long and will fall off. The plant will make more as it roots into the soil. You will want to keep this soil very slightly moist. Not wet. Let it dry out for a day in between spraying it again, and the cactus will soon show signs of new growth. Then you can care for it as usual.