To make sense of the question, note that for $f: A \to B$, $f^{-1}(P)$ represents the inverse image of a set $P\subseteq B$ under $f$. If $f(x)$ is treated as the set $\{f(x)\}$, then, by definition of inverse image,
$$f^{-1}(\{f(x)\}) = \{\ a : f(a)=f(x),\ a \in A \}$$
Since $f$ is a bijection, it is injective. Therefore,
$$f(a)=f(x)\implies a=x\\ \implies f^{-1}(\{f(x)\})=\{x\}, \forall\ x \in A\\$$
You can prove that $f(f^{-1}(x))=x, \ \forall\ x \in B$, similarly.
For the second part, observe that $g(f(x))=x, \forall\ x \in A,$ is a bijective function. $g(f(x))$ is injective $\implies f$ is injective and $g(f(x))$ is surjective $\implies g$ is surjective. Similarly, $f(g(x))=x, \forall\ x \in B,$ is a bijective function. $f(g(x))$ is injective $\implies g$ is injective and $f(g(x))$ is surjective $\implies f$ is surjective.
Thus, if such a $g$ exists, then both $f$ and $g$ are bijective. Let the inverse of $f$ be denoted by $f^{-1}$,
$$f(g(x))=x, \forall\ x \in B\\
\implies f^{-1}(f(g(x))=f^{-1}(x),\ \forall\ x \in B\\
\implies g(x)=f^{-1}(x),\ \forall\ x \in B$$