Not sure why it's been limping, the baby one also started limping and died recently. The bottom is a bit yellow but not rotten yet. Not sure how to care for it not that it's so tall
Cactus generally require lots of sunlight everyday. The only way to "fix" this plant is to put it in a place where it can get a minimum of 6 hours of sunlight. It will never look normal.