Question: This is the answer I can come up with. I get the complete opposite of what I'm supposed to get. My mistake is probably in the first part, could anyone help me out?

$$\left|x^2+x+1\right|\:\ge \left|x^2+x\right|-\left|1\right|\ge \left|x^2\right|-\left|x\right|-\left|1\right|\:=\:x^2\:-\left|x\right|-1
$$
and
$$
\frac{1}{\left|x^2+x+1\right|}\:=\:\:\:\frac{x^2\:-\left|x\right|-1}{\left|x^2+x+1\right|\left(x^2\:-\left|x\right|-1\right)}\:\:\:\le \:\frac{\left|x^2+x+1\right|}{\left|x^2+x+1\right|\left(x^2\:-\left|x\right|-1\right)}\:=\:\frac{1}{x^2\:-\left|x\right|-1}
$$

Answer: 
If $f(g(b))=b$ for all $b$, then in particular for $b:=f(a)$ we also have $f(g(f(a))=f(a)$ for all $a$. Now, using that $f$ is injective we arrive at $g(f(a)=a$.
The relation $\forall b \in B, f(g(b)) = b$ implies that $f$ is surjective, since for any $b\in B$, the element $g(b) \in A$ is sent to it by $f$. Thus $f$ is both an injection and a surjection, and therefore a bijection.