This is an exercise (1.4.11) from Marker. Fix a language $\mathcal L$ and $\mathcal L$-structure $\mathcal M$. For a subset $A \subseteq M$, an element of $M$ is algebraic over $A$ if it is a member of a finite $A$-definable subset of $M$. Let $\bar A$ denote the set of algebraic elements over $A$. We would like to show that $\bar {\bar A} = \bar A$.
Here's a failed attempt to solve the problem. Let a formula $\psi(x, b)$ defines a finite set with a parameter $b$ from $\bar A$ and $\phi (y, a)$ defines a finite set with a parameter $a$ from $A$ (for simplicity we assume the number of parameters is one). Then, naively, the formula $\exists z (\psi(x, z) \wedge \phi(z, a))$ will do the job. However, this formula is not known to define a finite set a priori.
I'd be grateful if you could help me in this problem.
Let $b\in\textrm{acl}\big(\textrm{acl}(A)\big)$. Then there is an $a\in\textrm{acl}(A)$ and formula $\psi(x,y)\in L(A)$ such that $\exists^n x\,\psi(x,a)\wedge\psi(b,a)$ for some $n$
As $a\in\textrm{acl}(A)$, there is a formula $\varphi(y)\in L(A)$ such that $\exists^m y\,\varphi(y)\wedge\varphi(a)$ for some $m$.
The following is a formula over $A$ that has at most $n\cdot m$ solutions and among these $b$:
$$\exists y \Big[\psi(x,y)\wedge\varphi(y)\wedge\exists^n x\,\psi(x,y)\Big]$$