Answer
See the steps.
Work Step by Step
\[|a-b] = \left\{
\begin{array}{lr}
a-b & : a > b\\
b-a & : b>a \\
0 &: a=b
\end{array}
\right.
\]
For $a>b$:
$$\dfrac{a+b+|a-b|}{2}= \dfrac{a+b+a-b}{2}\\ = \dfrac{2a}{2} = a$$
For $b>a$:
$$\dfrac{a+b+|a-b|}{2}= \dfrac{a+b+b-a}{2}\\ = \dfrac{2b}{2} = b$$
$\therefore max(a,b) = \dfrac{a+b+|a-b|}{2}$