Solution (source code)

= Solution
{c}

View $\hat R$ as a <noncommutative formal power series ring>, and let $\varepsilon:\hat R\to\mathbb Q$ take the coefficient of the empty <word>. This is a <ring homomorphism>, since the empty <word> has only the factorization $1\cdot1$. In particular the two-sided <ideal> $I$ generated by $x_1,x_2$ lies in $\ker\varepsilon$.

In fact $I=\ker\varepsilon$. Every <noncommutative formal power series> with zero <constant term> can be partitioned according to the first letter of its <words> and written
$$
h=x_1h_1+x_2h_2,\qquad h_1,h_2\in\hat R.
$$
Both summands belong to the two-sided <ideal> $I$.

For $a=1+h\in1+I$, define the formal <geometric series>
$$
g=\sum_{k=0}^\infty(-h)^k.
$$
This defines an element of $\hat R$: since $h$ has zero <constant term>, every <word> in $h^k$ has length at least $k$. Thus the coefficient of a fixed <word> of length $d$ receives contributions only from $0\leq k\leq d$, each a finite sum.

For each finite partial sum $g_N=\sum_{k=0}^N(-h)^k$, <associativity> gives both identities
$$
(1+h)g_N=g_N(1+h)=1-(-h)^{N+1}.
$$
In every fixed <word> degree the last term vanishes once $N$ is large enough. It follows coefficient by coefficient that $ag=ga=1$. Hence
$$
\boxed{(1+h)^{-1}=\sum_{k=0}^\infty(-h)^k\qquad(h\in I).}
$$
The argument is formal and uses no analytic convergence. More generally, every <noncommutative formal power series> with a nonzero rational <constant term> is a <unit>, after factoring out that scalar. This is the <unit criterion for noncommutative formal power series>.