Suppose that the lemma holds and that we are considering an instance of the replacement axiom, so we have a set $X$ and for some parameter $z$ and for every $x\in X$ there is a unique $y$ such that $\varphi(x,y,z)$, for some paramter $z$. Fix any set $w$ not in $X$, and let $R$ be the class relation such that $R(w,x)$$R(x,w)$ for each $x\in X$, and such that $R(x,y)$$R(y,x)$ whenever $\varphi(x,y,z)$. That is, the children of $w$ points at allare exactly the members of $X$, and each member $x$the child of any $X$ points at it$x\in X$ is precisely the corresponding $y$. ThisThus, the relation $R$ is set-like, because $w$ is related to the members ofsince $X$, which is a set, and each $x\in X$$\{y\}$ is $R$-related only to thea set for each $y$ such that $\varphi(x,y,z)$, and this singleton is a setarises. But the transitive closure of $R$ will relate $w$ to all the $y$'s that arise from any $x\in X$ to $w$. IfAnd so if the transitive closure of $R$ is set-like, then the set $\{y\mid \exists x\in X\, \varphi(x,y,z)\}$ will be a set, thereby verifying this instance of the replacement axiom.