[proofplan]
We first prove directly that $\operatorname{Hom}_{\mathcal A}(P,-)$ is left exact for every object $P$: it preserves the initial monomorphism and identifies the kernel of the second induced map with the image of the first. Therefore exactness of this Hom functor is reduced to surjectivity at the final term for every short exact sequence. That surjectivity is precisely the lifting property against epimorphisms, which is the definition of projectivity.
[/proofplan]
[step:Prove left exactness of the covariant Hom functor]
Let
\begin{align*}
0 \to X' \xrightarrow{i} X \xrightarrow{q} X''
\end{align*}
be exact in $\mathcal A$. We prove that
\begin{align*}
0 \to \operatorname{Hom}_{\mathcal A}(P,X') \xrightarrow{H_P(i)} \operatorname{Hom}_{\mathcal A}(P,X) \xrightarrow{H_P(q)} \operatorname{Hom}_{\mathcal A}(P,X'')
\end{align*}
is exact in $\operatorname{Ab}$.
First, $H_P(i)$ is injective. Indeed, if $\alpha,\beta:P \to X'$ satisfy
\begin{align*}
H_P(i)(\alpha)=H_P(i)(\beta),
\end{align*}
then
\begin{align*}
i \circ \alpha = i \circ \beta.
\end{align*}
Since $i$ is a monomorphism, $\alpha=\beta$.
Next, since the original sequence is exact at $X$, the morphism $i:X' \to X$ is a kernel of $q:X \to X''$. Hence
\begin{align*}
q \circ i = 0.
\end{align*}
Therefore, for every $\alpha:P \to X'$,
\begin{align*}
H_P(q)(H_P(i)(\alpha))
= q \circ i \circ \alpha
= 0,
\end{align*}
so
\begin{align*}
\operatorname{im} H_P(i) \subseteq \ker H_P(q).
\end{align*}
Conversely, let $\gamma:P \to X$ satisfy
\begin{align*}
H_P(q)(\gamma)=0.
\end{align*}
This means
\begin{align*}
q \circ \gamma = 0.
\end{align*}
Because $i:X' \to X$ is the kernel of $q$, the universal property of the kernel gives a unique morphism $\widetilde{\gamma}:P \to X'$ such that
\begin{align*}
i \circ \widetilde{\gamma}=\gamma.
\end{align*}
Equivalently,
\begin{align*}
H_P(i)(\widetilde{\gamma})=\gamma.
\end{align*}
Thus $\gamma \in \operatorname{im} H_P(i)$, and hence
\begin{align*}
\ker H_P(q) \subseteq \operatorname{im} H_P(i).
\end{align*}
Combining the two inclusions gives
\begin{align*}
\ker H_P(q)=\operatorname{im} H_P(i).
\end{align*}
Therefore $H_P$ is left exact.
[guided]
Let
\begin{align*}
0 \to X' \xrightarrow{i} X \xrightarrow{q} X''
\end{align*}
be exact in $\mathcal A$. We want to prove exactness after applying $\operatorname{Hom}_{\mathcal A}(P,-)$ up to the middle term. The induced maps are composition maps:
\begin{align*}
H_P(i):\operatorname{Hom}_{\mathcal A}(P,X') &\to \operatorname{Hom}_{\mathcal A}(P,X), &
\alpha &\mapsto i \circ \alpha,
\end{align*}
and
\begin{align*}
H_P(q):\operatorname{Hom}_{\mathcal A}(P,X) &\to \operatorname{Hom}_{\mathcal A}(P,X''), &
\gamma &\mapsto q \circ \gamma.
\end{align*}
First we check injectivity of $H_P(i)$. Suppose $\alpha,\beta:P \to X'$ satisfy $H_P(i)(\alpha)=H_P(i)(\beta)$. By definition of $H_P(i)$, this says
\begin{align*}
i \circ \alpha = i \circ \beta.
\end{align*}
Since exactness at $X'$ implies that $i$ is a monomorphism, cancellation through $i$ gives $\alpha=\beta$. Hence $H_P(i)$ is injective.
Now we identify the kernel of $H_P(q)$. Exactness at $X$ means that $i:X' \to X$ is a kernel of $q:X \to X''$. In particular,
\begin{align*}
q \circ i = 0.
\end{align*}
Therefore every morphism factoring through $i$ is killed by $q$: if $\alpha:P \to X'$, then
\begin{align*}
H_P(q)(H_P(i)(\alpha))
= q \circ i \circ \alpha
= 0.
\end{align*}
Thus $\operatorname{im} H_P(i) \subseteq \ker H_P(q)$.
For the reverse inclusion, take a morphism $\gamma:P \to X$ with $H_P(q)(\gamma)=0$. This condition is exactly
\begin{align*}
q \circ \gamma = 0.
\end{align*}
The universal property of the kernel $i:X' \to X$ says that every morphism into $X$ annihilated by $q$ factors uniquely through $i$. Applying this to $\gamma:P \to X$, there exists a unique morphism $\widetilde{\gamma}:P \to X'$ such that
\begin{align*}
i \circ \widetilde{\gamma}=\gamma.
\end{align*}
Equivalently,
\begin{align*}
H_P(i)(\widetilde{\gamma})=\gamma.
\end{align*}
So $\gamma$ lies in $\operatorname{im} H_P(i)$. This proves
\begin{align*}
\ker H_P(q)=\operatorname{im} H_P(i),
\end{align*}
and therefore the induced Hom sequence is exact at the first two nonzero terms.
[/guided]
[/step]
[step:Use projectivity to prove exactness of the Hom functor]
Assume that $P$ is projective. Let
\begin{align*}
0 \to X' \xrightarrow{i} X \xrightarrow{q} X'' \to 0
\end{align*}
be a short exact sequence in $\mathcal A$. By the previous step, the induced sequence
\begin{align*}
0 \to \operatorname{Hom}_{\mathcal A}(P,X') \xrightarrow{H_P(i)} \operatorname{Hom}_{\mathcal A}(P,X) \xrightarrow{H_P(q)} \operatorname{Hom}_{\mathcal A}(P,X'')
\end{align*}
is exact.
It remains to prove that $H_P(q)$ is surjective. Since the sequence is short exact, $q:X \to X''$ is an epimorphism. Let $\varphi:P \to X''$ be any morphism. Since $P$ is projective and $q$ is an epimorphism, there exists a morphism $\widetilde{\varphi}:P \to X$ such that
\begin{align*}
q \circ \widetilde{\varphi}=\varphi.
\end{align*}
By definition of $H_P(q)$,
\begin{align*}
H_P(q)(\widetilde{\varphi})=\varphi.
\end{align*}
Thus $H_P(q)$ is surjective. Hence
\begin{align*}
0 \to \operatorname{Hom}_{\mathcal A}(P,X') \xrightarrow{H_P(i)} \operatorname{Hom}_{\mathcal A}(P,X) \xrightarrow{H_P(q)} \operatorname{Hom}_{\mathcal A}(P,X'') \to 0
\end{align*}
is exact. Since the short exact sequence was arbitrary, $H_P$ is exact.
[/step]
[step:Use exactness of the Hom functor to prove projectivity]
Assume that $H_P$ is exact. To prove that $P$ is projective, let $q:X \to Y$ be an epimorphism in $\mathcal A$, and let $\varphi:P \to Y$ be a morphism. Since $\mathcal A$ is abelian, $q$ has a kernel; denote it by
\begin{align*}
k:K \to X.
\end{align*}
Because $q$ is an epimorphism in an abelian category, its cokernel is the zero object, so the sequence
\begin{align*}
0 \to K \xrightarrow{k} X \xrightarrow{q} Y \to 0
\end{align*}
is short exact.
Applying the exact functor $H_P$ gives an exact sequence
\begin{align*}
0 \to \operatorname{Hom}_{\mathcal A}(P,K) \xrightarrow{H_P(k)} \operatorname{Hom}_{\mathcal A}(P,X) \xrightarrow{H_P(q)} \operatorname{Hom}_{\mathcal A}(P,Y) \to 0.
\end{align*}
Exactness at the final term says that $H_P(q)$ is surjective. Hence there exists a morphism $\widetilde{\varphi}:P \to X$ such that
\begin{align*}
H_P(q)(\widetilde{\varphi})=\varphi.
\end{align*}
By definition of $H_P(q)$, this is
\begin{align*}
q \circ \widetilde{\varphi}=\varphi.
\end{align*}
Thus every morphism from $P$ to the codomain of an epimorphism lifts through that epimorphism. By the definition of projective object, $P$ is projective.
[guided]
Assume that $H_P=\operatorname{Hom}_{\mathcal A}(P,-)$ is exact. We must prove the lifting property that defines projectivity. Thus we take an arbitrary epimorphism $q:X \to Y$ in $\mathcal A$ and an arbitrary morphism $\varphi:P \to Y$, and we must construct a morphism $\widetilde{\varphi}:P \to X$ satisfying
\begin{align*}
q \circ \widetilde{\varphi}=\varphi.
\end{align*}
Because $\mathcal A$ is abelian, the morphism $q:X \to Y$ has a kernel. Let
\begin{align*}
k:K \to X
\end{align*}
denote this kernel. Since $q$ is an epimorphism in an abelian category, its cokernel is the zero object. Therefore the sequence
\begin{align*}
0 \to K \xrightarrow{k} X \xrightarrow{q} Y \to 0
\end{align*}
is short exact: $k$ is the kernel of $q$, and $q$ is the cokernel of $k$.
Now exactness of $H_P$ applies to this short exact sequence. It gives an exact sequence of abelian groups
\begin{align*}
0 \to \operatorname{Hom}_{\mathcal A}(P,K) \xrightarrow{H_P(k)} \operatorname{Hom}_{\mathcal A}(P,X) \xrightarrow{H_P(q)} \operatorname{Hom}_{\mathcal A}(P,Y) \to 0.
\end{align*}
The final zero means exactly that the map
\begin{align*}
H_P(q):\operatorname{Hom}_{\mathcal A}(P,X) \to \operatorname{Hom}_{\mathcal A}(P,Y)
\end{align*}
is surjective. Since $\varphi:P \to Y$ is an element of $\operatorname{Hom}_{\mathcal A}(P,Y)$, there exists $\widetilde{\varphi}:P \to X$ such that
\begin{align*}
H_P(q)(\widetilde{\varphi})=\varphi.
\end{align*}
Expanding the definition of $H_P(q)$ gives
\begin{align*}
q \circ \widetilde{\varphi}=\varphi.
\end{align*}
This is precisely the required lift of $\varphi$ through the epimorphism $q$. Since $q$ and $\varphi$ were arbitrary, $P$ satisfies the defining lifting property of a projective object.
[/guided]
[/step]
[step:Conclude the equivalence]
We have shown that if $P$ is projective, then $H_P$ sends every short exact sequence in $\mathcal A$ to a short exact sequence in $\operatorname{Ab}$. Conversely, if $H_P$ is exact, then every morphism $P \to Y$ lifts through every epimorphism $X \to Y$, so $P$ is projective. Therefore $P$ is projective if and only if $\operatorname{Hom}_{\mathcal A}(P,-)$ is exact.
[/step]