In the first one you just have to find the inverse of tanh(x), given that tanh(x) = all those e things. Given that natural logarithm (ln(x)) is the inverse of (e^x), I suspect that the inverse of tanh will be a function of ln(x).

In the 2nd piecewise function you just have to find the inverse of each piece as if it were a separate function.

For example f(x) = x^2 1 < x < 4 would lead to the inverse, g(x) being:

g(x) = sqrt(x) 1<x<4