There are different types of rosemary, and as the other poster said there are differences within one sub-species that can make identification a hazy academic pursuit.
If you bought rosemary that was labeled as such, you know you have rosemary. The plant you took out, consider it a type of rosemary and leave it at that. If you like the rosemary you had better, you can clone it with a cutting and grow it anew.