In Riehl's Category Theory in Context, the following result has proof left as an exercise:

Proposition 4.3.6. Suppose that $$F: \mathsf{A} \times \mathsf{B} \rightarrow \mathsf{C}$$ is a bifunctor so that for each object $$a \in \mathsf{A}$$, the induced functor $$F(a,-): \mathsf{B} \rightarrow \mathsf{C}$$ admits a right adjoint $$G_a: \mathsf{C} \rightarrow \mathsf{B}$$. Then:

(i) These right adjoints assemble into a unique bifunctor $$G: \mathsf{A}^{\mathrm{op}} \times \mathsf{C} \rightarrow \mathsf{B}$$, defined so that $$G(a, c)=G_a(c)$$ and so that the isomorphisms $$\mathsf{C}(F(a, b), c) \cong \mathsf{B}(b, G(a, c))$$ are natural in all three variables.

If furthermore for each $$b \in \mathsf{B}$$, the induced functor $$F(-, b): \mathsf{A} \rightarrow \mathsf{C}$$ admits a right adjoint $$H_b: \mathsf{C} \rightarrow \mathsf{A}$$, then:

(ii) There is a unique bifunctor $$H: \mathsf{B}^{\mathrm{op}} \times \mathsf{C} \rightarrow \mathsf{A}$$ defined so that $$H(b, c)=H_b(c)$$ and the isomorphisms $$\mathsf{C}(F(a, b), c) \cong \mathsf{B}(b, G(a, c)) \cong \mathsf{A}(a, H(b, c))$$ are natural in all three variables.

(iii) In this case, for each $$c \in \mathsf{C}$$, the functors $$G(-, c): \mathsf{A}^{\mathrm{op}} \rightarrow \mathsf{B}$$ and $$H(-, c): \mathsf{B}^{\mathrm{op}} \rightarrow \mathsf{A}$$ are mutual right adjoints.

(We say that a pair of contravariant functors $$F:\mathsf{C}^\mathrm{op}\to\mathsf{D}$$ and $$G:\mathsf{D}^\mathrm{op}\to\mathsf{C}$$ are mutually right adjoint if there exists a natural isomorphism $$\mathsf{D}(d,Fc)\cong\mathsf{C}(c,Gd)$$; on this case (iii) follows by definition and by (ii).)

Note that (ii) follows from (i) plus the isomorphism $$\mathsf{A}\times\mathsf{B}\cong\mathsf{B}\times\mathsf{A}$$. But how do we show (i)?

For each $$c\in\mathsf{C}$$, we define a functor $$G^c:\mathsf{A}^\mathrm{op}\to\mathsf{C}$$ in the following way: on objects, we have $$G^ca=G_ac$$. To define the action on a morphism $$f:a\to a'\in\mathsf{A}$$, we first consider the composite natural transformation $$\mathsf{B}(-,G_ac) \cong\mathsf{C}(F(a,-),c) \stackrel{F(f,-)^*}{\Longrightarrow}\mathsf{C}(F(a',-),c) \cong\mathsf{B}(-,G_{a'}c).$$ By the Yoneda lemma, this natural transformation comes from a morphism $$G^cf:G^ca\to G^ca'$$. Now, it is easy to see that $$G^c$$ is a functor. To get a functor $$G:\mathsf{A}^\mathrm{op}\times\mathsf{C}\to\mathsf{B}$$, we need to verify that $$\tag{1}\label{cond} G_{a'}g\cdot G^cf=G^{c'}f\cdot G_ag$$ for any $$f:a'\to a$$ in $$\mathsf{A}$$ and $$g:c\to c'$$ in $$\mathsf{C}$$ (see Corollary in [ref]). The left and right members of last identity correspond to the outer paths in this rectangle:
Note that the left and right squares commute since $$F(a,-)\dashv G_a$$, whereas the middle one commute since post-composition and pre-composition of morphisms commute. Hence \eqref{cond} holds.
Thus, we have an isomorphism $$\mathsf{C}(F(a,b),c)\cong\mathsf{B}(b,G(a,c))$$ natural in $$b$$ and $$c$$, by hypothesis. Naturality in $$a$$ is the definition of $$G^cf$$.