[step:Verify Replacement by regularity of $\kappa$]
Let $\varphi(u,v,p_1,\dots,p_m)$ be a first-order formula in the language of membership, let $p_1,\dots,p_m\in V_\kappa$ be parameters, and let $a\in V_\kappa$. Assume that $(V_\kappa,\in)$ satisfies the functional condition $\forall u\in a\,\exists!v\in V_\kappa\,\varphi(u,v,p_1,\dots,p_m)$.
For each $u\in a$, let $f(u)$ denote the unique element $v\in V_\kappa$ such that $(V_\kappa,\in)\models\varphi(u,v,p_1,\dots,p_m)$. Since $V_\kappa$ is a set in the ambient universe, the satisfaction relation for the set structure $(V_\kappa,\in)$ is first-order definable in the ambient universe. Hence the formula defining $f$ is an ambient first-order functional relation on the set $a$, and it defines a function $f:a\to V_\kappa$.
For each $u\in a$, choose an ordinal $\rho(u)<\kappa$ such that $f(u)\in V_{\rho(u)}$. Since $a\in V_\kappa$, choose $\alpha<\kappa$ with $a\in V_\alpha$. By the previous size estimate, $|V_\alpha|<\kappa$, and since $a\subset V_\alpha$, we have $|a|<\kappa$.
The set of ordinals $R=\{\rho(u):u\in a\}$ has cardinality at most $|a|$, hence cardinality $<\kappa$. Since $R\subset\kappa$ and $\kappa$ is regular, define $\beta=\sup R+1$. Then $\beta<\kappa$. For every $u\in a$, we have $\rho(u)<\beta$, so $f(u)\in V_\beta$. Therefore $f[a]=\{f(u):u\in a\}\subset V_\beta$.
The ambient Replacement axiom gives the set $f[a]$, and since $f[a]\subset V_\beta$, we have $f[a]\in V_{\beta+1}\subset V_\kappa$. Thus the image set required by Replacement exists inside $(V_\kappa,\in)$.
[/step]