I am working without Choice for the time being, so "cardinal" means "well-founded cardinal."
Let $\kappa$ be a strongly inaccessible cardinal. I want to show that the Axiom Schema of Replacement restricted to $V_ \kappa$ holds. That is, let $X \in V_\kappa$ and let $f: X \to V_\kappa$ be definable w.r.t. $V_\kappa$. I want to show $\operatorname{rng}(f) \in V_\kappa$.
I'm still new to set theory, so forgive me if this seems silly, but here's what I tried: I know that strongly inaccessible means there is no surjection $V_\alpha \to \kappa$ for any $\alpha < \kappa$, so my idea was to extend $f$ to a function $g:V_\alpha \to V_\kappa$. I think the fact that there's no surjection $V_\alpha \to \kappa$ means $\operatorname{rng}(g)$ has "holes," i.e. there's "missing" Von Neumann ranks, so maybe I can use this to show everything in the range has rank smaller than $\kappa$. But I'm having trouble making this formal.
The correct definition of inaccessible is "For every $x\in V_\alpha$, and $f\colon x\to\kappa$, $\operatorname{rng}(f)$ is bounded".
Note that this means that if $f\colon x\to V_\kappa$, then composing $f$ with the rank function is a function into $\kappa$, so it is bounded. Therefore the rank of $\operatorname{rng}(f)$ is bounded so it is an element of $V_\kappa$, and since $f\subseteq x\times\operatorname{rng}(f)$, it follows that $f\in V_\kappa$.
So indeed, we get second-order replacement holds in $V_\kappa$.