A useful way to check this sentence is to isolate the three grammar points it is testing and confirm each one separately: the noun form, the verb form, and the article.
First, the nouns. Since the sentence is a general statement about all customs officers and all passengers, both words need the plain plural form: "officers" and "passengers," with no apostrophe and no singular form.
Second, the verb. The subject "officers" is plural, so the auxiliary must be "do," not "does." And because "do not" already carries the negation and the tense, the main verb that follows has to stay in its bare form, "allow," never "allows."
Third, the article. "Country" here refers to a specific country, whichever one the passenger is entering or leaving, so it needs the definite article "the" in front of it, not no article at all.
Checking each option against these three points, only the version with "officers," "passengers," "do not allow," and "the country" gets all three right together.
So, the correct answer is Customs officers do not allow passengers to carry banned items into or out of the country.
Reading each version of this sentence aloud and noticing the first word that feels wrong to a native ear is a fast way to work through it.
Following the ear through each option and then confirming why it stumbled leads to the same option each time.
So, the correct answer is Customs officers do not allow passengers to carry banned items into or out of the country.