It is grammatically fine to have two identical pronouns referring to separate antecedents, but it's not necessarily the best way to write:
I had to clean up the carpet, so I looked in the closet and found a vacuum cleaner. It made it easier to do.
While it's understandable and grammatically valid, it's not the clearest way to say it. It would be better to replace one of the its (choose the one whose antecedent is furthest away, i.e. cleaning the carpet), with an appropriate noun or noun phrase:
I had to clean up the carpet, so I looked in the closet and found a vacuum cleaner. It made the job easier to do.