CaptainBlack is absolutely correct about the inverse of g. It has no inverse. However we may informally get an inverse (that is to say, the process is correct even if the application is not) by:
Let
Now switch the roles of x and y:
Now solve for y:

<-- via the quadratic formula
Thus
The problem, as CaptainBlack mentioned, is that for the graph y = g(x) there are two y values for every x (except at the vertex point), so we need to be very careful about defining a domain on which an inverse exists and just what that inverse is. (It will either be the "+" or the "-" of the inverse formula given above.)
-Dan