(We're working over $\mathcal{Ab}$)
Essentially, I need to show that if the following sequence is exact:$$0\rightarrow A\stackrel{f}{\longrightarrow}B\stackrel{g}{\longrightarrow} C \rightarrow0$$ then so is this sequence: $$0\rightarrow \text{Hom}(C,X)\xrightarrow{g^*=\ \text{$-\ \circ\ g$}} \text{Hom}(B,X)\xrightarrow{\text{$f^*=\ -\ \circ\ f$}} \text{Hom}(A,X)$$
So, it's straightforward to show the exactness at $\text{Hom}(C,X)$ i.e. the injectivity of $g^*$, since $g$ is an epimorphism
$$h \circ g=g^*(h) = g^*(k) = k \circ g \implies h=k$$
Now, to show $\ker f^* = \text{im } g^*$
Since, we have $f^* \circ g^*= (g \circ f)^* = 0^*=0 \implies \ker f^* \supseteq \text{im } g^*$
We now have to show that if $f^*(h) =h \circ f = 0 \implies \exists\ k$ such that $h=g^*(k) = k \circ g$
So, we have $$h(f(x))=0\ \ \forall x \in A \implies h(\text{im }f)=0 \implies h(\ker g)=0$$ I also have that $C\cong B/\ker g$, and I'll denote this isomorphism by $\phi$
So, we define $k \in \text{Hom}(C,X)$ as $k(x) = h(\phi(x))$. And since, $\phi(x)=b + k$, where $b \notin \ker g,\ k \in \ker g$. Then simply, $k(x) = h(b)$
Since $\phi$ was an isomorpshim, $h$ is completely defined by $k$ as well, and since $x \in C = \text{im }g \implies \exists\ y\in B\ \colon x=g(y) \implies h = k \circ g $
Therefore, $\ker f^* \subseteq \text{im } g^*$
I have a feeling that I've gone wrong somwhere, can I get some assistance accordingly?