Actually, this function `g` has no (one-valued) inverse function. For some y's there is no such `x` that `g(x)=y,` for some there are two such x's (two solutions of a quadratic equation). But we can consider two-valued functions, too.
The function `ax^2+bx+c` with a positive `a` has its minimum at `x_0 = (-b)/(2a).` For our function `g` it is `-(-4)/4 = 1,` the minimum value is `g(1) = 2 - 4 - 5 = -7.` So there are two points `x_1` and `x_2` such that `g(x) = -2.` To find them, we have to solve the quadratic equation
`2x^2-4x-5=-2,` or `2x^2-4x-3=0.`
The solutions are `x_(1,2)=(2+-sqrt(2^2+2*3))/2 = (2+-sqrt(10))/2 = 1+-sqrt(5/2).`
The final answer depends on the additional conditions. One may state that there are no `g^(-1)(-2),` that there are two values, `1-sqrt(5/2)` and `1+sqrt(5/2),` or choose one of them if there are some constraints on the domain of `g.`