Hi mathmari,
I will try to clear up the points of confusion. All good questions.
mathmari said:
At the last point why do we have that $f$ and $g$ are locally inverses of each other? What exactly does this mean?
This means that $f$ possesses an inverse when restricted to small enough open sets about points in its domain. For example, the function $f:\mathbb{R}\rightarrow [0,\infty)$ defined by $f(x) = x^{2}$ is not 1-1 on $\mathbb{R}$, so there does not exist a globally defined inverse $g: [0,\infty)\rightarrow \mathbb{R}$ on the range space, such that $f(g(x))=x$ and $g(f(x)) = x$; i.e., that $f$ and $g$ are inverses of each other.
However, $f$ is locally 1-1 at all points in $\mathbb{R}$ except at $x=0.$ What this means is that if we fix $x_{0}\in\mathbb{R}\setminus\{0\}$, we can always find an open ball (=interval in $\mathbb{R}$) about $x_{0}$ - say $B(x_{0})$ - such that the restriction $f|_{B(x_{0})}$ of $f$ to $B(x_{0})$ is 1-1. For such an $x_{0}$ we know exactly what the formula for $g$ should be: $$g(x)=\begin{cases}\sqrt{x} & x_{0}>0\\ -\sqrt{x} & x_{0}<0. \end{cases}$$ In general, however, we don't always have an explicit formula for the inverse function (Note: this is precisely the content of the implicit/inverse function theorem: it tells you such an inverse exists under the right conditions but does not tell you what the function is).Notice that this example closely parallels (though not exactly) the example you've asked about. How so? Because the Jacobian in this case is given by the derivative $f'(x) = 2x$. Notice that $f'(x)\neq 0$ on $\mathbb{R}\setminus\{0\}$ and it is precisely on the set $\mathbb{R}\setminus\{0\}$ that $f$ possesses local inverses (indeed, this is the implicit function theorem applied to this problem).
The intuition behind the implicit function theorem is the following: The best linear approximation (i.e., the Jacobian) of a continuously differentiable function approximates the function well enough that if the Jacobian mapping is invertible (i.e., has non-zero determinant), then the function will be locally invertible too.
Combined with the previous example and the statement regarding the intuition behind the theorem, hopefully it now seems plausible what the assumption means in the problem you originally asked: $f:O\rightarrow f(O)$ should be locally invertible because $\text{det}\,J_{f}(x)\neq 0$ at all points of $O\subset G$.
As a second example, $f:\mathbb{R}\rightarrow\mathbb{R}$ defined by $f(x)=x^{3}$ possesses a global inverse (namely, $g(x) = \sqrt[3]{x}$). This means we do not need to worry about neighborhoods of points in $f$'s domain because $f$ is 1-1 on its entire domain. It is true, nevertheless, that $f$ is locally invertible because you could always choose the neighborhood of a given point to be $\mathbb{R}$ itself.
EDIT: In simplest terms, to say that something is true locally means that it holds on particular subsets and not necessarily on the whole domain.
mathmari said:
Also we have that $f\in C^1(G)$ then it follows that $g\in C^1(G)$, or not?
$g$ will be $C^{1}$ on the open subset $V$ about $y_{0}$ contained in the range $f(O),$ not $G$. All of this information is what is given to us by the implicit function theorem.
mathmari said:
But why does this imply that $f(O)$ is open? Could you explain this further to me?
There are a few ways of showing this. The basic reasoning goes something like this: we are now guaranteed by the implicit function theorem that for each point $y_{0}$ in $f(O)$ and each fixed $x_{0}$ in the pre-image $f^{-1}(\{y_{0}\})$ that there are open sets about the chosen $x_{0}$ from the pre-image and $y_{0}$ that are in bijection with one another. Hence, the open set about $y_{0}$ must lie entirely within $f(O)$. Since $y_{0}$ was chosen arbitrarily, $f(O)$ is an open set.
To illustrate this point, let's revert back to the prior example of $f(x) = x^{2}$, where we are thinking of $f$ as defined on $O=\mathbb{R}\setminus\{0\}$, and note that $f'(x)\neq 0$ for all $x\in O$. Take, for the sake of example, $y_{0}=4.$ Then, $\{-2,2\} = f^{-1}(\{4\}).$ Since $f'(-2)=-4\neq 0$ and $f'(2)=4\neq 0$, according to the implicit function theorem whether we choose $x_{0}=-2$ or $x_{0}=2$ there will be an open set about $x_{0}$ and another open set, say $V$, about $y_{0}=4$ such that the two sets are in bijection. Since $V$ is in bijection with a subset of the domain it must lie entirely within the range of $f$. Since $y_{0}$ is arbitrary and $V$ is open, $f(O)$ is open (in fact, direct calculation shows that it is equal to $(0,\infty)$).
Note here that we didn't actually determine what the open sets were, we just know they must exist according to the theorem. This is common in math to know only that something exists and what its properties are (in this case that $V$ is open and $g$ is $C^{1}(V)$), even if you don't have an exact formulation for what you're talking about. If it helps, one possible choice of open sets if $x_{0}=2$ is chosen would be $V=(0,9)$ and $B(2)=(0,3).$ Then $f|_{B(2)}$ is a bijection from $B(2)$ to $V$ with inverse $g(x)=\sqrt{x}$ defined on $V$. Note that $g$ is indeed $C^{1}(V).$