Proving the existence of an homomorphism $k[x,x^{-1}] \to R$ where $R$ is a ring containing $k$ and a unit I’d like to understand how to prove the following statement that I found in this answer:

For any commutative ring $k$, the ring $k[x; 1/x]$ is characterized by
the following "mapping property": for any other ring $R$ containing
$k$ and a unit $u \in R$, there is a homomorphism $\psi: k[x; 1/x] \to
 R$ such that $\psi(a) = a$ for $a \in k$ and $\psi(x) = u$.

I was thinking of maybe using the universal property of the polynomial ring $k[x,y]$, but I’m not sure how to proceed.
 A: While the ideal way would be to use the universal properties of $k[x]$ and localization, you can explicitly define the map and check that things work. (This is a special case of the work done in checking the universal properties of localisation. But life is simpler here since there are no zerodivisors to worry about.)
Define $\psi : k[x, x^{-1}] \to R$ by
$$\frac{a_0 + a_1 x + \cdots + a_n x^n}{x^m} \mapsto u^{-m}(a_0 + a_1 u + \cdots + a_n u^n).$$
The element on the right makes sense since $u$ is a unit and $k \subset R$.
Next, you need to check that this is well-defined, i.e., if
$$\frac{a_0 + a_1 x + \cdots + a_n x^n}{x^m} = \frac{b_0 + b_1 x + \cdots + b_r x^r}{x^t},$$
then
$$u^{-m}(a_0 + a_1 u + \cdots + a_n u^n) = u^{-t}(b_0 + b_1 u + \cdots + b_n u^r).$$
After this, you need to check that the above is a ring homomorphism, which should be easier.
Note: You did not specify this, but the universal property should also include that $\psi$ is unique.
To see this, first note that $1 = \psi(1) = \psi(x) \psi(x^{-1})$ and conclude that $\psi(x^{-1}) = u^{-1}$.
Now use the properties of a ring homomorphism to conclude that $\psi$ must take the above form.
