Option 1 -> "had to opened" is grammatically incorrect and doesn't follow subjunctive structure.
Option 2 -> "not be opened" correctly uses the subjunctive mood required after "recommended that."
Option 3 -> "ought not to opened" is incorrect; modal "ought to" doesn't fit the subjunctive structure.
Option 4 -> "should not opened" is grammatically incorrect; missing "be" for passive voice or wrong verb form.
Hence, Option 2 -> After verbs like "recommend," "suggest," or "demand," English uses the subjunctive mood, which requires the base form of the verb. The correct structure is "recommend that + subject + (not) + base verb." Here, "not be opened" follows this rule perfectly, making the sentence: "They recommended that the windows not be opened." -> correct