[guided]The goal is to convert the statement
\begin{align*}
\forall u \in \mathbb{N},\ \exists v \in \mathbb{N},\ R(x,u,v)=1
\end{align*}
into a statement saying that a single partial computable function is total. The natural way to do this is to make the input $u$ ask for its own witness $v$.
Define
\begin{align*}
\Psi: \mathbb{N}^2 \rightharpoonup \mathbb{N}
\end{align*}
by the following algorithm: given $(x,u) \in \mathbb{N}^2$, compute $R(x,u,0)$, then $R(x,u,1)$, then $R(x,u,2)$, and continue in increasing order. If the first value $v$ with $R(x,u,v)=1$ is found, halt and output $0$.
This algorithm is partial computable because $R$ is computable and the search over all values of $v \in \mathbb{N}$ is effective. If a witness $v$ exists, then the search reaches such a witness after finitely many stages and halts. If no witness exists, then every tested value fails and the search never halts. Therefore, for every $x,u \in \mathbb{N}$,
\begin{align*}
\Psi(x,u)\downarrow
\iff \exists v \in \mathbb{N},\ R(x,u,v)=1.
\end{align*}
This equivalence is the key encoding: totality in the $u$-variable will become the universal quantifier $\forall u$ in the $\Pi^0_2$ definition of $A$.[/guided]