I'm doing exercise 17 in Atiyah-MacDonald, where I am proving that the prime spectrum of a ring is (quasi-)compact. I have shown that an open covering of sets $X_{f_i}$ for $i\in I$ for some index set $I$ implies that $f_i$ for $i\in I$ generates the unit ideal $(1) = A$. In the hint it is claimed that this means there is a finite combination of the generators $f_i$ which is equal to $1$, and I am having trouble proving this. Even on the Columbia stacks, this step is stated without much reason. Maybe I am just overlooking something simple.
Here is my attempt at reasoning. We can create a chain of ideals by adding more and more of the $f_i$. Supposing that no finite combination of the $f_i$ is equal to $1$, we can create an infinite chain of ideals. Now, I imagine Zorn's lemma might come in handy here? But again, I would like to think there is a simpler way to resolve this problem.