[proofplan]
We use the natural isomorphism to manufacture the two candidate inverse morphisms directly. The component of $\eta$ at $A$ sends $\operatorname{id}_A$ to a morphism $B \to A$, while the inverse component of $\eta$ at $B$ sends $\operatorname{id}_B$ to a morphism $A \to B$. Naturality of $\eta$ and of $\eta^{-1}$ then proves that the two composites are the identity morphisms.
[/proofplan]
[step:Extract the two candidate inverse morphisms from the natural isomorphism]
Let $\eta: \operatorname{Hom}_{\mathcal C}(A,-) \Rightarrow \operatorname{Hom}_{\mathcal C}(B,-)$ be the given natural isomorphism. Thus, for each object $X \in \operatorname{Ob}(\mathcal C)$, the component
\begin{align*}
\eta_X: \operatorname{Hom}_{\mathcal C}(A,X) \to \operatorname{Hom}_{\mathcal C}(B,X)
\end{align*}
is a bijection, and these bijections are natural in $X$.
Define a morphism $\alpha: B \to A$ in $\mathcal C$ by
\begin{align*}
\alpha := \eta_A(\operatorname{id}_A).
\end{align*}
Since $\eta_B$ is a bijection
\begin{align*}
\eta_B: \operatorname{Hom}_{\mathcal C}(A,B) \to \operatorname{Hom}_{\mathcal C}(B,B),
\end{align*}
define a morphism $\beta: A \to B$ in $\mathcal C$ by
\begin{align*}
\beta := \eta_B^{-1}(\operatorname{id}_B).
\end{align*}
[/step]
[step:Use naturality of $\eta$ to prove $\beta \circ \alpha = \operatorname{id}_B$]
Apply naturality of $\eta$ to the morphism $\beta: A \to B$. The naturality square says that postcomposition by $\beta$ commutes with the components $\eta_A$ and $\eta_B$:
\begin{align*}
\eta_B(\beta \circ f) = \beta \circ \eta_A(f)
\end{align*}
for every morphism $f: A \to A$ in $\mathcal C$. Taking $f = \operatorname{id}_A$ gives
\begin{align*}
\eta_B(\beta)
= \eta_B(\beta \circ \operatorname{id}_A)
= \beta \circ \eta_A(\operatorname{id}_A)
= \beta \circ \alpha.
\end{align*}
By the definition of $\beta$, we have $\eta_B(\beta)=\operatorname{id}_B$. Therefore
\begin{align*}
\beta \circ \alpha = \operatorname{id}_B.
\end{align*}
[guided]
Naturality says that the isomorphism between the two representable functors is compatible with postcomposition. For the specific morphism $\beta: A \to B$, the functor $\operatorname{Hom}_{\mathcal C}(A,-)$ sends $\beta$ to the map
\begin{align*}
\operatorname{Hom}_{\mathcal C}(A,A) &\to \operatorname{Hom}_{\mathcal C}(A,B),\\
f &\mapsto \beta \circ f,
\end{align*}
and the functor $\operatorname{Hom}_{\mathcal C}(B,-)$ sends $\beta$ to the map
\begin{align*}
\operatorname{Hom}_{\mathcal C}(B,A) &\to \operatorname{Hom}_{\mathcal C}(B,B),\\
g &\mapsto \beta \circ g.
\end{align*}
Commutativity of the naturality square gives
\begin{align*}
\eta_B(\beta \circ f) = \beta \circ \eta_A(f)
\end{align*}
for every morphism $f: A \to A$.
Now choose $f=\operatorname{id}_A$. Since $\alpha$ was defined by $\alpha=\eta_A(\operatorname{id}_A)$, we obtain
\begin{align*}
\eta_B(\beta)
= \eta_B(\beta \circ \operatorname{id}_A)
= \beta \circ \eta_A(\operatorname{id}_A)
= \beta \circ \alpha.
\end{align*}
But $\beta$ was defined as $\eta_B^{-1}(\operatorname{id}_B)$, so $\eta_B(\beta)=\operatorname{id}_B$. Hence
\begin{align*}
\beta \circ \alpha = \operatorname{id}_B.
\end{align*}
[/guided]
[/step]
[step:Use naturality of $\eta^{-1}$ to prove $\alpha \circ \beta = \operatorname{id}_A$]
Let $\theta: \operatorname{Hom}_{\mathcal C}(B,-) \Rightarrow \operatorname{Hom}_{\mathcal C}(A,-)$ denote the inverse natural isomorphism, so $\theta_X=\eta_X^{-1}$ for each object $X \in \operatorname{Ob}(\mathcal C)$. Apply naturality of $\theta$ to the morphism $\alpha: B \to A$. For every morphism $g: B \to B$ in $\mathcal C$,
\begin{align*}
\theta_A(\alpha \circ g) = \alpha \circ \theta_B(g).
\end{align*}
Taking $g=\operatorname{id}_B$ gives
\begin{align*}
\theta_A(\alpha)
= \theta_A(\alpha \circ \operatorname{id}_B)
= \alpha \circ \theta_B(\operatorname{id}_B)
= \alpha \circ \beta.
\end{align*}
Since $\alpha=\eta_A(\operatorname{id}_A)$, we have $\theta_A(\alpha)=\operatorname{id}_A$. Therefore
\begin{align*}
\alpha \circ \beta = \operatorname{id}_A.
\end{align*}
[guided]
To prove the other composite is the identity, we use the inverse natural isomorphism
\begin{align*}
\theta: \operatorname{Hom}_{\mathcal C}(B,-) \Rightarrow \operatorname{Hom}_{\mathcal C}(A,-),
\end{align*}
whose component at each object $X$ is the inverse bijection $\theta_X=\eta_X^{-1}$. This inverse is natural because $\eta$ is a natural isomorphism.
Apply naturality of $\theta$ to the morphism $\alpha: B \to A$. The functor $\operatorname{Hom}_{\mathcal C}(B,-)$ sends $\alpha$ to postcomposition by $\alpha$:
\begin{align*}
\operatorname{Hom}_{\mathcal C}(B,B) &\to \operatorname{Hom}_{\mathcal C}(B,A),\\
g &\mapsto \alpha \circ g,
\end{align*}
while $\operatorname{Hom}_{\mathcal C}(A,-)$ sends $\alpha$ to postcomposition by $\alpha$:
\begin{align*}
\operatorname{Hom}_{\mathcal C}(A,B) &\to \operatorname{Hom}_{\mathcal C}(A,A),\\
h &\mapsto \alpha \circ h.
\end{align*}
Therefore naturality gives
\begin{align*}
\theta_A(\alpha \circ g) = \alpha \circ \theta_B(g)
\end{align*}
for every morphism $g: B \to B$.
Set $g=\operatorname{id}_B$. Since $\beta=\eta_B^{-1}(\operatorname{id}_B)=\theta_B(\operatorname{id}_B)$, we get
\begin{align*}
\theta_A(\alpha)
= \theta_A(\alpha \circ \operatorname{id}_B)
= \alpha \circ \theta_B(\operatorname{id}_B)
= \alpha \circ \beta.
\end{align*}
Also, because $\alpha=\eta_A(\operatorname{id}_A)$ and $\theta_A=\eta_A^{-1}$, we have
\begin{align*}
\theta_A(\alpha)=\operatorname{id}_A.
\end{align*}
Hence
\begin{align*}
\alpha \circ \beta = \operatorname{id}_A.
\end{align*}
[/guided]
[/step]
[step:Conclude that $A$ and $B$ are isomorphic]
The morphisms $\beta: A \to B$ and $\alpha: B \to A$ satisfy
\begin{align*}
\alpha \circ \beta = \operatorname{id}_A,
\qquad
\beta \circ \alpha = \operatorname{id}_B.
\end{align*}
Therefore $\beta$ is an isomorphism in $\mathcal C$ with inverse $\alpha$. Hence $A$ and $B$ are isomorphic objects of $\mathcal C$.
[/step]