In p.69 of Tourlakis's mathematical logic book.
He pulls a very specific theorem seemingly out of thin air.
$\Gamma_\infty^M \vdash \exists_x(f \bar n ... = x)$
I'm not sure how this is derived as there are no theorems about the restricted theory and function symbols.
The closest thing I found was it derives some general $\exists_x(A)$ but can $A = f \bar n ... = x$ in every case? Is this the correct train of thought?

The context is the "Henkin construction" of the model needed for the proof of the Completeness Theorem.
At page 65 you can see the definition of the set $\Gamma_{\infty}$ of formulas.
At page 67 there is the definition of its "restriction" $\Gamma_{\infty}^M$.
$M$ is defined as a subset of $\mathbb N$ :
where $f(n) = \text { the smallest } m \text { such that } m ∼ n$ [using Definition I.5.25 of page 66 for the equivalence relation $∼$].
Consider now page 69 :
this is not the fucntion $f$ above. The new one is a symbol of the language.
Why? By axioms for equality : $x=x$ [Ax3., page 34], followed by Corollary I.4.12 (Substitution of Terms) : $\vdash f_k(\overline {n_1},\ldots, \overline {n_k})=f_k(\overline {n_1},\ldots, \overline {n_k})$.
Finally apply Ax2. : $\mathcal A[x ← t] \to (∃x) \mathcal A \text { for any term } t$, to get :