Does ralink wireless card compatible with linksys router?

If they're both 802.11g wireless they should be.

BUT If the router is 802.11n you might have a problem if a) the Ralink is an early g type (even if the Linksys is set to mixed) b) the Ralink and Linksys are n but early models where there were issues between brands.

Firmware update might be worth doing, but follow the instructions to the letter.