Exercise 17 in chapter 4 of Introduction to Commutative Algebra by Atiyah and Macdonald hints for you to use transfinite induction to complete the proof.
I have not come across transfinite induction before but the Wolfram page seems to make it fairly simple- it's looks exactly like strong induction but just on a well-ordered set $S$ instead of $\mathbb{N}$.
My main issue however is with identifying what $S$ should be in this case.
I tried something like " if $a_k \neq (1) \forall k \leq n$ then $q_{n+1}$ exists and $a=\cap_{i=1}^{n+1} q_i \cap (a_{n+1} + (x_{n+1}))$" but I don't see why this is any different from normal induction nor how it uses the observation that $a_{n-1} \subset a_n$.
Full text of the exercise:
17. Let $A$ be a ring with the following property.
(L1) For every ideal $\mathfrak a\ne(1)$ in $A$ and every prime ideal $\mathfrak p$, there exists $x\notin\mathfrak p$ such that $S_{\mathfrak p}(\mathfrak a) = (\mathfrak a:x)$, where $S_{\mathfrak p}=A - \mathfrak p$.
Then every ideal in $A$ is an intersection of (possibly infinitely many) primary ideals.[Let $\mathfrak a$ be an ideal $\ne (1)$ in $A$ and let $\mathfrak p_1$ be a minimal element of the set of prime ideals containing $\mathfrak a$. Then $\mathfrak q_1=S_{\mathfrak p_1}(\mathfrak a)$ is $\mathfrak p$-primary (by Exercise 11), and $\mathfrak q_1= (\mathfrak a:x)$ for some $x\notin \mathfrak p_1$. Show that $\mathfrak a= \mathfrak q_1 \cap (\mathfrak a+(x))$.
Now let $\mathfrak a_1$ be a maximal element of the set of ideals $\mathfrak b \supseteq \mathfrak a$ such that $\mathfrak q_1\cap \mathfrak b = \mathfrak a$, and choose $\mathfrak a_1$ so that $x\in \mathfrak a_1$, and therefore $\mathfrak a_1\not\subseteq \mathfrak p_1$. Repeat the construction starting with $\mathfrak a_1$, and so on. At the $n$th stage we have $\mathfrak a= \mathfrak q_1 \cap \dots \cap \mathfrak q_n \cap \mathfrak a_n$ where the $\mathfrak q_t$ are primary ideals, $\mathfrak a_n$ is maximal among the ideals $\mathfrak b$ containing $\mathfrak a_{n-1}=\mathfrak a_n \cap \mathfrak q_n$, such that $\mathfrak a=\mathfrak q_1\cap\cdots\cap\mathfrak q_n\cap\mathfrak b$, and $\mathfrak a_n \not\subseteq \mathfrak p_n$. If at any stage we have $\mathfrak a_n=(1)$, the process stops, and $\mathfrak a$ is a finite intersection of primary ideals. If not, continue by transfinite induction, observing that each $\mathfrak a_n$ strictly contains $\mathfrak a_{n-1}$.]