“The labor of fools wearies them.” The verse actually reads, “The labor of fools wearies him,” but the lack of agreement between “fools” (plural) and “him” (singular) occurs occasionally in the Old Testament. Also, it sometimes occurs that God uses the singular to emphasize the fact that people stand or fall on their own. We don’t live before God as a group; people are approved or disapproved by God based on their own actions alone.
“he does not know how to go to a city.” Likely a proverb expressing stupidity concerning that which is commonly known. We might say, “That person does not know to come in out of the cold.” The fool goes on and on about things he supposedly knows, but in reality what he “knows” is just foolishness.
It is also remotely possible to translate the verse as one long statement: that “The labor of fools wearies him who does not know how to go to a city,” in other words, what fools do confuses the ignorant or stupid. But that would be a very unusual use of “labor.”