This question already has an answer here:
- How can I find a lost item? 3 answers
I sold something to Mallus Maccius and I actually need it now, it was a peice of armor and he does't carry that, is there anyway i can get it back?
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Unique items (e.g. Dragon Claws) remain in the inventory of the storekeepers indefinitely. However items such as armour, whilst they will remain for a day or so, are liable to be lost permanently when the storekeeper's merchandise chest resets. For more information on recovering lost items in Skyrim see this question (which again focusses mainly on unique items).