[step:Use regularity to verify Replacement]
Let $a \in V_\kappa$, let $p_1,\dots,p_n \in V_\kappa$, and let $\varphi(u,v,p_1,\dots,p_n)$ be a formula such that $(V_\kappa,\in)$ satisfies
\begin{align*}
\forall u \in a \, \exists! v \, \varphi(u,v,p_1,\dots,p_n).
\end{align*}
Because $V_\kappa$ is a set, the satisfaction relation for first-order formulas over the structure $(V_\kappa,\in)$ is definable in the ambient universe by recursion on formulas. Define the ambient functional relation $\Theta(u,v)$ to mean that $v \in V_\kappa$ and $(V_\kappa,\in)\models \varphi(u,v,p_1,\dots,p_n)$. The displayed hypothesis says that for every $u \in a$ there exists a unique ambient set $v$ such that $\Theta(u,v)$ holds. Applying ambient Replacement to the definable functional relation $\Theta$ on the set $a$, we obtain the image set
\begin{align*}
b = \{v \in V_\kappa : \exists u \in a \text{ such that } (V_\kappa,\in)\models \varphi(u,v,p_1,\dots,p_n)\}.
\end{align*}
For each $u \in a$, let $v_u$ denote the unique element of $V_\kappa$ satisfying $(V_\kappa,\in)\models \varphi(u,v_u,p_1,\dots,p_n)$. Since $a \in V_\kappa$, the rank-size estimate gives $|a| < \kappa$. The set of ranks
\begin{align*}
R = \{\operatorname{rank}(v_u) : u \in a\}
\end{align*}
has cardinality at most $|a|$, hence cardinality less than $\kappa$. Also $R \subset \kappa$ because each $v_u \in V_\kappa$. By regularity of $\kappa$, there is an ordinal $\delta < \kappa$ such that $\operatorname{rank}(v_u) < \delta$ for every $u \in a$. Hence $b \subset V_\delta$, so $b \in V_{\delta+1} \subset V_\kappa$. Thus the required replacement image exists inside $V_\kappa$.
[/step]