The insight: available space equals capacity minus occupancy. Both need to fit, so difference must be at least 2. Room with 3 people and capacity 5? Exactly 2 spots, works. Capacity 5 with 4 people? Only 1 find, fails.
You don't store all rooms. Process each as you read it: calculate space, check threshold, increment counter if it passes. This streaming approach saves memory and keeps code simple. The condition capacity - occupancy >= 2 is all you need.
One comparison per room. No complex logic or edge cases.