If your function is `f`, then your invers is function `f^(-1)` which satisfies the following equation `f(f^(-1)(x))=x.` So in your case you have `(3f^(-1)(x)-1)^2+1=x`
Now you take square root of both sides of equation.
` ` `3f^(-1)(x)-1=pm sqrt(x-1)`
We have `pm` because quadratic equation has 2 solutions (e.g. `x^2=25=>x=pm5` when we square number 5 we get 25 but when we square -5 we also get 25).
Blue is graph of function `f` ` ` and red is graph of `f^(-1)`. Upper side of red graph is for + and lower is for -. Notice that the green line (`y=x` ) is axis of symmetry for red and blue graph.