Original: This was done either through a special tax, or through a law that required that the inhabitants of the city helped build the walls.
Simplified: This was done either through a special tax, or through a law that that the people of the city helped build the walls.