$i \circ f$ is not defined when $i : A \to X$ and $f: Z \to X$, as the codomain of $f$ is not a always subset of the domain of $i$.
But when it is defined (i.e. when $f[Z] \subseteq A$) it will be continuous as a composition of continuous functions.
What is true is that
a function $f:Z \to A$ is continuous iff $ i \circ f: Z \to X$ is continuous.
because $A$ has the initial topology w.r.t. $i$. For detailed definitions and proofs see my answer here.
Quick proof for this special case: if $f$ is continuous so is $i \circ f$ (composition). OTOH, if $i \circ f$ is continuous, let $O$ be open in $A$, i.e. $O= O' \cap A$ for some open $O' \subseteq X$.
Observe that $O' \cap A= i^{-1}[O']$ and the given continuity implies that $(i \circ f)^{-1}[O']$ is open in $Z$ and that set equals $f^{-1}[i^{-1}[O']] = f^{-1}[O]$ and so $f$ is continuous.