[guided]The goal is to convert a recognizer for membership in $A$ into an enumerator whose outputs are exactly the elements of $A$. The recognizer is the partial computable function $\psi$: it halts exactly on the elements of $A$, but it may never halt outside $A$. Since we cannot simply run $\psi(1),\psi(2),\dots$ one after another, we use bounded simulations.
Fix a computable pairing function that codes each pair $(n,s) \in \mathbb{N} \times \mathbb{N}$ by a single natural number $j \in \mathbb{N}$, and whose decoding functions are computable. Define
\begin{align*}
\varphi: \mathbb{N} \rightharpoonup \mathbb{N}
\end{align*}
as follows. Given $j \in \mathbb{N}$, decode it as $(n,s)$. Simulate the computation $\psi(n)$ for exactly $s$ steps. If that bounded simulation halts, output $n$. If it does not halt within those $s$ steps, let the computation of $\varphi(j)$ diverge.
This is a partial computable function because every operation before the possible divergence is effective: decoding $j$ is computable, and a simulation for exactly $s$ steps is a finite mechanical procedure.
We now check that the range is exactly $A$. First suppose $m \in \operatorname{range}(\varphi)$. Then there exists an input $j \in \mathbb{N}$ such that $\varphi(j)\downarrow = m$. Decode $j$ as $(n,s)$. The only way $\varphi(j)$ can halt is that the bounded simulation of $\psi(n)$ halts within $s$ steps, and in that case the output is exactly $n$. Therefore $m=n$, and $\psi(m)=\psi(n)$ halts. Since $A=\operatorname{dom}(\psi)$, this gives $m \in A$.
Conversely suppose $m \in A$. Since $A=\operatorname{dom}(\psi)$, the computation $\psi(m)$ halts. Let $t \in \mathbb{N}$ be a number of computation steps sufficient for this halting computation. Let $j$ be the code of the pair $(m,t)$. On input $j$, the machine for $\varphi$ decodes $(m,t)$, simulates $\psi(m)$ for $t$ steps, sees the halt, and outputs $m$. Hence $m \in \operatorname{range}(\varphi)$.
Thus every output of $\varphi$ lies in $A$, and every element of $A$ is eventually output by $\varphi$. Therefore $A=\operatorname{range}(\varphi)$, so $A$ is computably enumerable.[/guided]