[proofplan]
We prove exactness after applying each Hom functor to an arbitrary short exact sequence. For the covariant functor, exactness follows from the fact that $i:A' \to A$ is the kernel of $p:A \to A''$: maps $X \to A$ killed by $p$ are exactly those that factor uniquely through $i$. For the contravariant functor, the dual argument uses that $p:A \to A''$ is the cokernel of $i:A' \to A$: maps $A \to X$ killed by precomposition with $i$ are exactly those that factor uniquely through $p$.
[/proofplan]
[step:Apply $\operatorname{Hom}_{\mathcal A}(X,-)$ to a short exact sequence]
Let
\begin{align*}
0 \longrightarrow A' \xrightarrow{i} A \xrightarrow{p} A'' \longrightarrow 0
\end{align*}
be a short exact sequence in $\mathcal A$. By definition of short exactness in an abelian category, $i$ is a monomorphism, $p$ is an epimorphism, $i = \ker p$, and $p = \operatorname{coker} i$.
Define group homomorphisms
\begin{align*}
i_*: \operatorname{Hom}_{\mathcal A}(X,A') &\longrightarrow \operatorname{Hom}_{\mathcal A}(X,A), &
f &\longmapsto i \circ f, \\
p_*: \operatorname{Hom}_{\mathcal A}(X,A) &\longrightarrow \operatorname{Hom}_{\mathcal A}(X,A''), &
g &\longmapsto p \circ g.
\end{align*}
Since composition in an abelian category is biadditive, both $i_*$ and $p_*$ are homomorphisms of abelian groups.
Because $p \circ i = 0$, for every $f:X \to A'$ we have
\begin{align*}
(p_* \circ i_*)(f) = p \circ i \circ f = 0.
\end{align*}
Thus $\operatorname{im} i_* \subseteq \ker p_*$.
[/step]
[step:Use the kernel property of $i$ to identify $\ker p_*$ with $\operatorname{im} i_*$]
We first prove that $i_*$ is injective. Let $f_1,f_2:X \to A'$ be morphisms such that $i_*(f_1)=i_*(f_2)$. Then
\begin{align*}
i \circ f_1 = i \circ f_2.
\end{align*}
Since $i$ is a monomorphism, it follows that $f_1=f_2$. Hence
\begin{align*}
0 \longrightarrow \operatorname{Hom}_{\mathcal A}(X,A') \xrightarrow{i_*} \operatorname{Hom}_{\mathcal A}(X,A)
\end{align*}
is exact at $\operatorname{Hom}_{\mathcal A}(X,A')$.
It remains to prove $\ker p_* \subseteq \operatorname{im} i_*$. Let $g:X \to A$ be a morphism with $g \in \ker p_*$. This means
\begin{align*}
p \circ g = 0.
\end{align*}
Since $i:A' \to A$ is the kernel of $p:A \to A''$, the universal property of the kernel gives a unique morphism $u:X \to A'$ such that
\begin{align*}
i \circ u = g.
\end{align*}
Therefore $g=i_*(u)$, so $g \in \operatorname{im} i_*$. Together with $\operatorname{im} i_* \subseteq \ker p_*$, this gives
\begin{align*}
\operatorname{im} i_* = \ker p_*.
\end{align*}
Thus
\begin{align*}
0 \longrightarrow \operatorname{Hom}_{\mathcal A}(X,A') \xrightarrow{i_*} \operatorname{Hom}_{\mathcal A}(X,A) \xrightarrow{p_*} \operatorname{Hom}_{\mathcal A}(X,A'')
\end{align*}
is exact.
[guided]
We need to prove two exactness assertions for the covariant Hom sequence. First, exactness at $\operatorname{Hom}_{\mathcal A}(X,A')$ means that $i_*$ is injective. Suppose $f_1,f_2:X \to A'$ satisfy $i_*(f_1)=i_*(f_2)$. By definition of $i_*$, this says
\begin{align*}
i \circ f_1 = i \circ f_2.
\end{align*}
Because the original sequence is short exact, $i:A' \to A$ is a monomorphism. The defining cancellation property of a monomorphism therefore gives $f_1=f_2$. Hence $i_*$ is injective.
Second, exactness at $\operatorname{Hom}_{\mathcal A}(X,A)$ means
\begin{align*}
\operatorname{im} i_* = \ker p_*.
\end{align*}
The inclusion $\operatorname{im} i_* \subseteq \ker p_*$ follows from the identity $p \circ i=0$: for every $f:X \to A'$,
\begin{align*}
p_*(i_*(f)) = p \circ i \circ f = 0.
\end{align*}
For the reverse inclusion, take a morphism $g:X \to A$ with $g \in \ker p_*$. By definition of $p_*$, this means
\begin{align*}
p \circ g = 0.
\end{align*}
The important structural fact is that $i:A' \to A$ is not merely any monomorphism: it is the kernel of $p:A \to A''$. The universal property of the kernel says precisely that every morphism into $A$ whose composite with $p$ is zero factors uniquely through $i$. Applying this to $g:X \to A$, there exists a unique morphism $u:X \to A'$ such that
\begin{align*}
i \circ u = g.
\end{align*}
Thus $g=i_*(u)$, so $g \in \operatorname{im} i_*$. Hence $\ker p_* \subseteq \operatorname{im} i_*$, and therefore
\begin{align*}
\operatorname{im} i_* = \ker p_*.
\end{align*}
This proves exactness of the covariant Hom sequence.
[/guided]
[/step]
[step:Apply $\operatorname{Hom}_{\mathcal A}(-,X)$ and use the cokernel property of $p$]
Define group homomorphisms
\begin{align*}
p^*: \operatorname{Hom}_{\mathcal A}(A'',X) &\longrightarrow \operatorname{Hom}_{\mathcal A}(A,X), &
f &\longmapsto f \circ p, \\
i^*: \operatorname{Hom}_{\mathcal A}(A,X) &\longrightarrow \operatorname{Hom}_{\mathcal A}(A',X), &
g &\longmapsto g \circ i.
\end{align*}
Again, biadditivity of composition makes these maps homomorphisms of abelian groups. Since $p \circ i=0$, for every $f:A'' \to X$ we have
\begin{align*}
(i^* \circ p^*)(f) = f \circ p \circ i = 0,
\end{align*}
so $\operatorname{im} p^* \subseteq \ker i^*$.
The map $p^*$ is injective because $p$ is an epimorphism. Indeed, if $f_1,f_2:A'' \to X$ satisfy $p^*(f_1)=p^*(f_2)$, then
\begin{align*}
f_1 \circ p = f_2 \circ p,
\end{align*}
and the epimorphism property of $p$ gives $f_1=f_2$.
Now let $g:A \to X$ satisfy $g \in \ker i^*$. Then
\begin{align*}
g \circ i = 0.
\end{align*}
Since $p:A \to A''$ is the cokernel of $i:A' \to A$, the universal property of the cokernel gives a unique morphism $u:A'' \to X$ such that
\begin{align*}
u \circ p = g.
\end{align*}
Thus $g=p^*(u)$, so $g \in \operatorname{im} p^*$. Therefore
\begin{align*}
\operatorname{im} p^* = \ker i^*.
\end{align*}
Hence
\begin{align*}
0 \longrightarrow \operatorname{Hom}_{\mathcal A}(A'',X) \xrightarrow{p^*} \operatorname{Hom}_{\mathcal A}(A,X) \xrightarrow{i^*} \operatorname{Hom}_{\mathcal A}(A',X)
\end{align*}
is exact.
[guided]
For the [contravariant Hom functor](/theorems/3973), the arrows reverse. The map induced by $p:A \to A''$ is precomposition with $p$:
\begin{align*}
p^*: \operatorname{Hom}_{\mathcal A}(A'',X) &\longrightarrow \operatorname{Hom}_{\mathcal A}(A,X), &
f &\longmapsto f \circ p.
\end{align*}
The map induced by $i:A' \to A$ is precomposition with $i$:
\begin{align*}
i^*: \operatorname{Hom}_{\mathcal A}(A,X) &\longrightarrow \operatorname{Hom}_{\mathcal A}(A',X), &
g &\longmapsto g \circ i.
\end{align*}
Because composition in an abelian category is additive in each variable, both maps are homomorphisms of abelian groups.
Exactness first requires $i^* \circ p^*=0$. For $f:A'' \to X$,
\begin{align*}
(i^* \circ p^*)(f) = i^*(f \circ p) = f \circ p \circ i.
\end{align*}
The original sequence is exact, so $p \circ i=0$. Hence
\begin{align*}
(i^* \circ p^*)(f)=0.
\end{align*}
This proves $\operatorname{im} p^* \subseteq \ker i^*$.
Next, $p^*$ is injective because $p$ is an epimorphism. If $f_1,f_2:A'' \to X$ satisfy $p^*(f_1)=p^*(f_2)$, then
\begin{align*}
f_1 \circ p = f_2 \circ p.
\end{align*}
Since $p$ is an epimorphism, right cancellation along $p$ gives $f_1=f_2$. Thus the sequence is exact at $\operatorname{Hom}_{\mathcal A}(A'',X)$.
Finally, we identify the kernel of $i^*$. Let $g:A \to X$ be a morphism with $g \in \ker i^*$. By definition,
\begin{align*}
g \circ i = 0.
\end{align*}
Here the relevant part of short exactness is that $p:A \to A''$ is the cokernel of $i:A' \to A$. The universal property of the cokernel says that every morphism out of $A$ which kills $i$ factors uniquely through $p$. Applying this to $g:A \to X$, there exists a unique morphism $u:A'' \to X$ such that
\begin{align*}
u \circ p = g.
\end{align*}
Therefore $g=p^*(u)$, so $g \in \operatorname{im} p^*$. This proves $\ker i^* \subseteq \operatorname{im} p^*$. Combined with the reverse inclusion already proved, we obtain
\begin{align*}
\operatorname{im} p^* = \ker i^*.
\end{align*}
Thus the contravariant Hom sequence is exact.
[/guided]
[/step]
[step:Conclude both Hom functors are left exact]
The covariant argument shows that $\operatorname{Hom}_{\mathcal A}(X,-)$ sends every short exact sequence in $\mathcal A$ to an exact sequence through the first three terms. Therefore $\operatorname{Hom}_{\mathcal A}(X,-)$ is left exact.
The contravariant argument shows that $\operatorname{Hom}_{\mathcal A}(-,X)$ sends every short exact sequence
\begin{align*}
0 \longrightarrow A' \xrightarrow{i} A \xrightarrow{p} A'' \longrightarrow 0
\end{align*}
to the exact sequence
\begin{align*}
0 \longrightarrow \operatorname{Hom}_{\mathcal A}(A'',X) \xrightarrow{p^*} \operatorname{Hom}_{\mathcal A}(A,X) \xrightarrow{i^*} \operatorname{Hom}_{\mathcal A}(A',X).
\end{align*}
Equivalently, as a functor $\mathcal A^{\operatorname{op}} \to \operatorname{Ab}$, $\operatorname{Hom}_{\mathcal A}(-,X)$ is left exact. This proves both assertions.
[/step]