Find the inverse function of $f(x):=\sqrt x-\sqrt {4-x}+2$ 
Let $f(x):=\sqrt x-\sqrt {4-x}+2$.
Then:
$(i)$ Find the inverse function of $f(x)$
$(ii)$ What is the largest domain of $\sqrt {f(x)-f^{-1}(x)}$ ?


My work:
We know that
$$f:[0,4]\longrightarrow \mathbb [0,4]\\f^{-1}(x):[0,4]\longrightarrow [0,4]$$
Let $2-x=t$, then we have,
$$\begin{aligned}&f(2-t)-2=\sqrt {2-t}-\sqrt {2+t} \\
\implies &f^2(2-t)-4f(2-t)+4=4-2\sqrt {4-t^2}\\
\implies &\left(f^2(2-t)-4f(2-t)\right)^2=4(4-t^2)\\
\implies &t^2=\frac{16-\left(f^2(2-t)-4f(2-t)\right)^2}{4}\\
\implies &(2-x)^2=\frac{16-\left(f^2(x)-4f(x)\right)^2}{4}\\
\implies &f^{-1}(x)=2\pm \frac {\sqrt{16-(x^2-4x)^2}}{2}\end{aligned}$$
We see that the inverse function $f^{-1}(x)$ can be define
$$\begin{aligned}f^{-1}(x)&:=\begin{cases} 2-\frac {\sqrt{16-(x^2-4x)^2}}{2}\,,\text{if}\,\,\,0\leq x<2\\2+\frac {\sqrt{16-(x^2-4x)^2}}{2}\,,\text{if}\,\,\,\,2\leq x\leq 4
\end{cases}\end{aligned}$$
Finally, we need to solve
Case $-1:$
$$
\begin{aligned}&f(x)\ge f^{-1}(x),\,\sqrt x\ge \sqrt {4-x}\\
\implies &\sqrt x -\sqrt {4-x}\ge \frac {\sqrt{16-(x^2-4x)^2}}{2}\\
\implies &4-2\sqrt {4x-x^2}\ge \frac {16-(x^2-4x)^2}{4}\\
\implies &64(4x-x^2)\leq (4x-x^2)^4\\
\implies & 64u\leq u^4,\, u=4x-x^2 \\
\implies & x=2 \vee x=4\end{aligned}
$$
Case $-2: $
$$
\begin{aligned}&f(x)\ge f^{-1}(x),\,\sqrt x< \sqrt {4-x}\\
\implies &\sqrt x -\sqrt {4-x}\ge -\frac {\sqrt{16-(x^2-4x)^2}}{2}\\
\implies &4-2\sqrt {4x-x^2}\leq \frac {16-(x^2-4x)^2}{4}\\
\implies &64(4x-x^2)\ge (4x-x^2)^4\\
\implies & 64u\ge u^4,\\
\implies & 0\leq x<2\end{aligned}
$$
So, my answer is:
$$x\in[0,2]\cup \{4\}$$


My questions are:
$(i)$ Are my attempts/answer correct
$(ii)$ Is the inverse function I defined correct?


Yes, you have done it well. Pictorially, $f(x)$ and $f^{-1}(x)$ are plotted below here in blue and red respectively. The green linr is $f(x)=x$.

Next $\sqrt{f(x)-f^{-1}(x)}$ is plotted below

