The arc explained that actually. Danger was the one to diagnose Rogue, Xavier himself pointed out that she managed to figure it out in a few seconds something Xavier struggled with for years.
Once he found out what was wrong with Rogue he was able to go in and fix her.