Official solution
\[f(x) = {\tan ^{ - 1}}(\sin x - \cos x),\,\,\,\,\,[0,\pi ]\]
Let \[g(x) = \sin x - \cos x\]
\[ = \sqrt 2 \sin \left( {x - {\pi \over 4}} \right)\] and \[x - {\pi \over 4} \in \left[ {{{ - \pi } \over 4},\,{{3\pi } \over 4}} \right]\]
\[\therefore\] \[g(x) \in \left[ { - 1,\,\sqrt 2 } \right]\]
and \[{\tan ^{ - 1}}x\] is an increasing function
\[\therefore\] \[f(x) \in \left[ {{{\tan }^{ - 1}}( - 1),\,{{\tan }^{ - 1}}\sqrt 2 } \right]\]
\[ \in \left[ { - {\pi \over 4},\,{{\tan }^{ - 1}}\sqrt 2 } \right]\]
\[\therefore\] Sum of \[{f_{\max }}\] and \[{f_{\min }} = {\tan ^{ - 1}}\sqrt 2 - {\pi \over 4}\]
\[ = {\cos ^{ - 1}}\left( {{1 \over {\sqrt 3 }}} \right) - {\pi \over 4}\]