I am having difficulty taking the inverse of the following function (case-defined):
$$ f(x)=\begin{cases} \frac{1}{4 \sqrt{ |1-x|}} & \text{if} \ x\in [0,2] \\ 0 & \text{otherwise}\end{cases}$$
Could someone kindly explain to me how to handle the if/else portion when calculating an inverse?
I have managed to compute that if $y = f(x)$ then
$$x = 1 - \frac{1}{16y^2}$$ or
$$x = 1 + \frac{1}{16y^2}$$
However, I believe it's the last step of putting it altogether that I can't pull off.

The function is not $1 \text{ to } 1$; its inverse as a function does not exist. We would call it a relation instead.
Note
In the way that you have $f(x)$ defined, you need to specify $x\ne 1$. Also that function if then defined in that way on $[0,2]$ with $x\ne1$, doesn't have an inverse function . Since it's not $1 \text{ to } 1$. (Flunks the horizontal line test). The $0$ piece is trivially not $1$ to $1$ either.
Second Note
The formula you give for $x$ are correct. If you had the same function, $f(x)$, and you created two different functions,
$$ g(x) = f(x) $$ with domain $x\in[0,1)$
and $$ h(x) = f(x) $$ with domain $x\in(1,2]$
Then your formula would precisely be respective inverse functions for $g(x)$, and $h(x)$.