On the two definitions of adjunctions

(Note that we write compositions from left to right and accordingly apply most maps on the right.)

A functor F:\ct A\to\ct B  is called a left adjoint to a functor U:\ct B\to\ct A  if there is a bijection between the homsets:

    \[\ct B(A^F\ig B) \simeq \ct A(A\ig B^U)\]

natural in both A and B. In this case U is called a right adjoint to F, and we write F\adj U.

A functor F:\ct A\to\ct B is called a left adjoint to a functor U:\ct B\to\ct A if there are natural transformations \eta:1_{\ct A}\tto FU and \eps:UF\tto 1_{\ct B} satisfying the zig-zag identities:

    \[\matrix{\eta F\cdot F\eps = 1_F &\sep U\eta\cdot \eps U=1_U}\]

So, why are these two definitions equivalent?

We start out from Def.2, as it generalizes to arbitrary bicategory or double category, which enable morphisms (‘transformations‘ or ‘2-cells‘) between [parallel] arrows. Transformations will be depicted by a dashed arrow symbol: \tto.
We are using the bicategory \ct Cat which has functors as arrows and natural transformations as transformations, and the bicategory \ct Prof which has profunctors as arrows. And we are going to pass them both to Ehresmann’s double category construction of ‘quintets‘.

In short, we will obtain a full inclusion of (doubly weak) double categories of the quintets of \ct Cat into that of \ct Prof which is covariant for vertical arrows but contravariant for horizontal arrows, hence taking adjunctions to companions and companions to adjunctions.
Noting that companions are just ismorphisms in the ambient bicategory, we will conclude that an adjunction in \ct Cat corresponds to an isomorphism in \ct Prof and a natural isomomorphism (in particular, the identity of any functor) in \ct Cat corresponds to an adjunction in \ct Prof.

Note that, both sides of the natural bijection in Def.1 are functors \ct A\op\times\ct B\to\Set, i.e. are profunctors.
Specifically, they above are denoted by F_*   and   U^*,  that is, for a single functor  H:\ct A\to\ct B, we define

    \[H_*(A,B):=\ct B(A^H\ig B) \quad\quad H^*(B,A):=\ct B(B\ig A^H)\]

In the terminology of heteromorphisms, we can get H_*  if we take a copy from each arrow in \ct B of the form A^H\to B  and regard them as heteromorphisms A\to B. The copy of 1_{A^H} is a reflection arrow A\to A^H (into the full subcategory \ct B), these generate the profunctor H_*:\ct A\ag\ct B.
Similarly, H^*:\ct B\ag\ct A is generated by the coreflection arrows A^H\to A.

Importantly, it turns out that there is an adjunction   H_*\adj H^*   in the bicategory \ct Prof of categories and profunctors, for any functor H:\ct A\to\ct B (according to Def.2).

In the setting of bicategories [double categories], one can already prove uniqueness of left/right adjoint for a given arrow (up to isomorphism) and the following interchanging rules, which assert one-to-one correspondences between the transformations below, supposed f_*\adj f^*:

    \[\matrix{ \frac{g\tto hf^*}{gf_*\tto h} &\sep \frac{f^*g\tto h}{g\tto f_*h} }\]

The mappings I_*:=F\mapsto F_* and I^*:=F\mapsto F^*  extend to two natural embeddings of the bicategory \ct Cat, whose arrows are the functors, into \ct Prof.
Note that I^* is contravariant on arrows (reverses source/target and composition of functors) while I_* is contravariant on the natural transformations.
To express these as covariant mappings, the notations \ct B^{op} and \ct B^{co} are introduced for the bicategory obtained from \ct B by reversing arrows / transformations, respectively.

Using the interchange rules, we show below how to arrive to the embedding I_*:\ct Cat^{co}\emb \ct Prof when starting out from I^*:\ct Cat^{op}\emb\ct Prof, touching an embedding of double categories, J, in the middle of the way:

A diagram of functors   \nzt UF{\lambda}GV   with \lambda:UG\tto FV induces and is determined by any of the following profunctor morphisms:

    \[\EEE{\lambda^*:\,G^*U^*\tto V^*F^*}{U^*\tto G_*V^*F^*}{\begin{matrix}\\ \phantom{_} \lambda^J:\,U^*F_*\tto G_*V^*\\ \phantom{_} \end{matrix}}{F_*\tto U_*G_*V^*}{\lambda_*:\,F_*V_*\tto U_*G_*}\]

In a double category, transformations u\tto v are supported by a pair of ‘vertical arrows‘ (regarding the original arrows as horizontal ones), and thus are depicted and also called as squares (or ‘cells’).
Horizontally adjacent squares, as well as horizontal arrows can be associatively composed horizontally, with units.
Vertically adjacent squares, as well as vertical arrows can be associatively composed vertically, with units.

The so called Ehresmann double category {\bf Q}(\ct B) can be defined{}^\ast for any bicategory \ct B:  all the arrows of \ct B  are considered both vertical and horizontal in {\bf Q}(\ct B),  with squares   \nzt uf\lambda gv   as transformations ug\tto fv.

Now we are ready to define our embedding J: its source is the double category {\bf Q}(\ct Cat), and its target is the double category {\bf Q}(\ct Prof), and J flips horizontal arrows and horizontal composition.
So that J:{\bf Q}(\ct Cat)^{op}\emb{\bf Q}(\ct Prof). All objects (the categories) are fixed, a horizontal arrow (a functor U) is mapped to U^*, while a vertical arrow (a functor F) is mapped to F_* and a square \lambda is mapped to the corresponding square of \lambda^J. Compositions just work fine.

Explicitly, \lambda^J:U^*F_*\to G_*V^* sends the pair of generating heteromorphisms A^U\to A,\ A\to A^F to the composite A^U\to A^{UG} \fl{A^\lambda}\longrightarrow A^{FV} \to A^F for any A\in\, Ob\ct A.

Adjunction f\adj u in a double category is interpreted between a vertical f and horizontal u, in such a way that f\adj u in  {\bf Q}(\ct B) for a bicategory \ct B translates readily to f being left adjoint to u  in  \ct B,  according to Def.2.

If we flip horizontal arrows in a double category, adjunctions become companions:
A pair of horizontal and vertical arrows u:A\to Bf:\matrix{A\\ \downarrow \\ B}  are said to be a companion pair, if there exist squares  \eta,\eps  as below

    \[\nzt{1_A}{1_A}\eta fu\quad\quad \nzt uf\eps{1_B}{1_B}\]

such that   \eta\eps=1_u   and   \displaystyle{\frac\eta\eps} (vertical composition) =1_f.
It is easy to see, that a companion in {\bf Q}(\ct B) is just a pair of parallel isomorphic arrows in \ct B.

Since J:{\bf Q}(\ct Cat)^{op}\emb{\bf Q}(\ct Prof) flips horizontal arrows, J takes adjunctions to companions and companions to adjunctions.

Moreover, J is surjective on squares.

Put it all together, we get that
two functors are naturally isomorphic F\simeq G if and only if there is an adjunction of profunctors F_*\adj G^*. (This is basically one of the key observations above that F_*\adj F^*.)
And, finally,

two functors are adjoint F\adj U according to Def.2 if and only if we have an isomorphism of profunctors F_*\cong U^*, i.e. Def.1 holds.

\ast: Remark. Actually, there are issues about formalizing Ehresmann’s construction for general bicategories.
When composition of arrows in a bicategory is strictly associative, we indeed get a (still strictly associative) double category {\bf Q}(\ct B). Otherwise, however, the resulting double category would be only weakly associative both horizontally and vertically, and such animals can only be defined by workarounds, e.g. using higher dimension categories with special collapses.

But don’t panic, we can still make things precise by introducing adequate maps from double categories to bicategories, so that J would become such a map   {\bf Q}(\ct Cat)^{op} \to \ct Prof,  with all its good properties, in particular taking companions to adjunctions and an adjunction to a pair of isomorphic arrows.