The closet will probably work for awhile. However, 2.5 feet wide is not big enough. Minimum dimensions for one adult iguana are 6' tall by 6' long by 4' wide. The bigger the better.
I also would not recommend housing two igs together. Sometimes, and I sress *sometimes* this will work for two adult female iguanas. But if they are males the will get territorial and fight when they are adults. If they are male and female, they will breed (and may still get territorial and fight). It's generally a better idea to just house them separately rather than risk this. Even if they don't fight per se, often one ig will be dominant and keep the other from getting to the food or a basking spot.