All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
Sharee‘ah (Islamic law) texts indicate that anyone who is kind to animals is entitled to receive a reward. This applies for animals that Muslims are not ordered to kill, such as mad dogs. Abu Hurayrah narrated that the Prophet, sallallaahu ‘alayhi wa sallam, said that one is rewarded for feeding or being kind to any creature with a liver. [Al-Bukhari and Muslim]
On the other hand, you are not sinful for expelling the cat, because the Hadeeth (narration) indicates that the woman was sinning because she locked up the cat without offering it any food. You did the opposite; you fed the cat and then released it. The Hadeeth which you have mentioned in the question is authentic; it is narrated in Al-Bukhari and Muslim.
Allaah Knows best.