Solution (source code)

= Solution

The <Maurer-Cartan form> is $g^{-1}dg=\lambda^jX_j$. Direct matrix multiplication gives
$$
g^{-1}dg=\begin{pmatrix}d\rho/\rho&dx^1/\rho&dx^2/\rho\\0&0&0\\0&0&0\end{pmatrix},\qquad
\boxed{\lambda^0=\frac{d\rho}{\rho},\quad\lambda^1=\frac{dx^1}{\rho},\quad\lambda^2=\frac{dx^2}{\rho}.}
$$
These are <left-invariant differential forms>: for a constant group element $a$, $(ag)^{-1}d(ag)=g^{-1}dg$. Equivalently, left translation sends $(\rho,x)$ to $(a\rho,b+ax)$, so all three coordinate differentials and the denominator acquire the same factor $a>0$.

The <left-invariant coframe of the translation-dilation group> is pointwise linearly independent because $\rho>0$. Consequently
$$
h=\sum_{j=0}^2\lambda^j\otimes\lambda^j
$$
is positive definite and unchanged under every left translation. \b[It therefore defines the required <left-invariant metric>], with precisely the coordinate expression obtained from this sum. The notation $d\rho^2$ in that metric means $d\rho\otimes d\rho$, not the differential of $\rho^2$.