If $R(\gamma)\preccurlyeq R(\delta) $ then $R(\gamma)\models ZFC$ I'm attempting the following exercise: (Working in $ZFC$ without foundation) Assume $0<\gamma<\delta$ and $R(\gamma)$ (also called $V_{\gamma}$ sometimes) is an elementary substruce of $R(\delta)$ then $R(\gamma)\models ZFC$ (and so $R(\delta)$ does too). I know $R(\gamma)\models ZC$ (ZFC without replacementent) whenever $\gamma$ is a limit $>\omega$. And I know how to show our $\delta$ here must be a limit and $>\omega$. So I'm just missing the replacement axiom.
The exercise includes a hint: "For the replacement axiom in $R(\gamma)$, if $A\in R(\gamma)$ and if $\forall x\in A \exists ! y \varphi(x,y)$ holds, then $\exists B \forall x\in A \exists y\in B \varphi(x,y)$ must hold in $R(\delta)$."
I don't know how to prove what the hint says, as I feel it is not even true. As I can define $\varphi(x,y) =$ "$y$ is some fixed ordinal bigger than $\delta$" and take a singleton set $A\in R(\gamma)$, and it will be true that $\forall x\in A \exists ! y \varphi(x,y)$ but there can't be a $B$ in $R(\delta)$ that contains this $y$ as this $y$ can't be in $R(\gamma)$!
Thank you for reading.
P.S. This is exercise I.16.8 from Kunen's Set Theory.
 A: The idea for replacement is that: If you have a function defined on your universe (by the use of a formula), then the image of a set under this class function must still be a set. 
So suppose that you have $A\in{R(\gamma)}$ and $\forall{x}\in{A}\exists{!y}\varphi{(x,y)}$. Now notice that we have $B$, the image of the values of $A$ under the function given by $\varphi$, inside of $R(\gamma)$ is a set (our ambient universe which has $R(\gamma)$ etc as subclasses satisfies replacement, and as such the sets $A$, and $B$ are in our ambient universe as sets. Think about why this is true of $B$).
Now this set is a subset of $R(\gamma)$ as $\forall{x}\in{A}\exists{!y}\varphi{(x,y)}$. But the construction of the universe $R$ (or V) is such that subsets at level $\gamma$, become elements at level $\gamma+1$. So $B\in{R(\delta)}$, as a set. Now the elementarity allows us to move the existence formula downstairs to $R(\gamma)$. Thus we have the required result.
The problem with your example for the failure of this statement is that the formula $\varphi$ in some vague sense doesn't have access to the $\delta$ (you should think more about why this is: Hint, $\varphi$ is a formula of set theory, what language is $\delta$ in?) in the way you want it to. 
