Slytherin helps her in the lab, as best he can. His memories about how the House Elves were subjugated in the first place help her piece the process together, and he suggests different reagents and ingredients that might help counter the spell.