I'm reading Miroslav Repicky's paper "A proof of the independence of the Axiom of Choice from the Boolean Prime Ideal Theorem" and I'm confused by the claim that an ideal $I$ on a Boolean algebra $B$ being prime in $OD^{V[G]}[A,f\frown h]$ implies that it must be a maximal ideal of $B$ in $OD^{V[G]}[A,f\frown h]$. For context, below is a screenshot of the relevant section of the argument:
My concern is that while $I$ selects between $x$ and $\neg x$ for every $x\in B\cap OD^{V[G]}[A,f\frown h]$, it is possible that there is some ideal $I'\subseteq B\setminus OD^{V[G]}[A,f\frown h]$ so that $I$ and $I'$ generate a larger proper ideal $J$ of $B$, with $I,I',J\in OD^{V[G]}[A,f\frown h]$. In other words, if $OD^{V[G]}[A,f\frown h]$ is not transitive, $I$ may be prime here without being maximal.
Is there something I'm missing? Any help would be greatly appreciated!
Edit: It seems like the argument runs properly if we take $k$ to be the least natural number so that for some $h'\in^{k+1}A$, $I$ is not maximal in $OD^{V[G]}[A,f\frown h']$ and make the appropriate minor adjustments from this point onwards.

The argument is not trying to show $I$ is prime in $OD^{V[G]}[A,f\frown h]$, it is trying to show that $I$ is prime in $M$. I think this is what you're confused about.
I'll try to repeat relevant parts of their argument. As they described, you can construct $I$. $I\subseteq B$, so every element of $I$ is in $M$, and $I$ has the same support as $B$, so $I\in M$. We want to show that $M\models I\text{ is prime}$; that is, for every $x\in M$, either $x\in I$ or $\lnot x\in I$. It will follow that $M\models I\text{ is maximal}$.
Suppose for contradiction that $I$ is not prime in $M$. Then there must be some $x\in M$ so that neither $x$ nor $\lnot x$ is in $I$. Let us choose such an $x$ with minimal support.
[the rest of their argument will reach a contradiction from assuming $x$ has minimal support; it's not in the screenshot so I assume you understood it]