Duality 2-functor on adjunctions
The definition of $D(\sigma)$ is not correct, but almost, it might be a typo in the book:
Say, we have $\mathcal A\overset{F,F'}\to\mathcal B$, then the natural transformation $U\sigma\circ\eta$ goes $1_{\mathcal A}\to UF\to UF'$ while the domain of $U\varepsilon'$ is $UF'U'$. So we are missing an $U'$ here, by syntax, and the correct version would be $$D(\sigma)\ :=\ U\varepsilon'\circ U\sigma U'\circ \eta U'\,,$$
Now, this $D(\sigma)$ goes $U'\Rightarrow U\ $ in the functor category $Fun(\mathcal B, \mathcal A)$, but if we converse the arrows in $\mathcal A$, we get the opposite direction (for the exactly same mappings $U,U'$):
$\quad D(\sigma):U\Rightarrow U'$ in $Fun(\mathcal B^{op},\mathcal A^{op})$, $\ $ exactly in the wished direction.
Finally, we will have $$D^2(\sigma)=\varepsilon F'\circ\ F\,D(\sigma)\,F' \circ F\eta'\,.$$
I personally prefer to work with double categorical notation, i.e, arranging the 2-cells into squares. E.g., the unit of the adjunction $\eta$ can be drawn as
$\ \ \ \, \overset{1_{\mathcal A}}\longrightarrow$
$F\! \downarrow \,\eta\,\downarrow \!\! 1_{\mathcal A} \quad\quad$ read in direction $\ \swarrow$
$\ \ \ \, \underset{U}\longrightarrow$
Then, $D(\sigma)$ will be just three squares ($\varepsilon',\ \sigma$ and $\eta$) pasted together.
All in all, $D^2(\sigma)$ will be the composite of the following squares:
$\def\-{-\!\!-\!\!-} \ \ \ \ \-$
$ \ \ \ \ \vert\ \ \eta' \ \vert$
$ \ \ \ \ \- \, \- \, \- $
$ \ \ \ \ \vert\ \ \varepsilon'\ \ \vert\ \ \ \sigma\ \ \vert\ \ \ \eta\ \ \vert$
$ \ \ \ \ \- \, \- \, \- $
$\hspace{4.2pc}\vert\ \ \ \varepsilon\ \ \vert$
$\hspace{4.4pc}\-$
which indeed gives back $\sigma$ as expected, by the adjunction properties.
(All you need to verify is that horizontal and vertical compositions of 2x2 squares commute with each other in this context, and then extend the picture by identity squares.)