Its about impossible to know which version of the roms that you have. You can use a program called Clrmamepro to have them match with any version of Mame, but you need another set of roms to do that with usually. For now, it's not something that'll be easy for you to do.
Your Mame folder should have a "roms" directory in it. Put all your roms in that folder and leave them zipped.
There isn't always a big change between Mame versions for most roms so it's fairly common for most roms to work between different versions like .138 and .140. However, not all will work. There are times though when there is a big change between versions which affects a lot of roms.
Your best bet is to figure out where you got your roms and see what version they are. If you know that, you can easily get the Mame version to match the roms. If you can't figure that out, you need to find a site that shows you what version of the roms that they have. Google it and you'll find a variety of places. Again, make sure you know what version they are! That's the key.
