Yea, XP SP2's firewall can be a bitch.
You need to go to Start>Control Panel>Windows Firewall>Excpetions - then check the list of programs being aothorised by the firewall, and if Yahoo Messnger is blocked, unblock it, if it's not even showing in the list, I think you can add programs
Try that mate