Understanding proof of isomorphism in Category Theory

$f_\ast$ is injective because if $f_\ast(g)=f_\ast(g')$ for $g,g' \in C(Z,X )$ then $g' \circ f = g \circ f$ and right cancellation with $f$ (compose both sides with $f^{-1}$ etc) gives $g=g'$ and $f_\ast$ is onto as when $h \in C(Z,Y)$ then $f_\ast(h \circ f^{-1})=h$ by definitions. So one direction seems pretty clear. (isomorphism implies set isomorphism aka bijection). Or is that not the direction you're worried about? Why try to construct the (faulty, as Eric pointed out) example ? Where's your doubt in the proof of the fact itself?