Define $M$ as the set of all pairs $(p, r)$ where $r$ is an affine line $r \subset \mathbb{R}^2$ and $p \in r$.
I am given a map $P \colon \mathbb{R}^3 \to M$ where $(u_1, u_2, u) \mapsto (p,r)$ where $p = (u_1, u_2)$ and $r = \{(x,y) \in \mathbb{R}^2 \mid y-u_2 = u(x-u_1)\}$ and I am asked the following
Show that $P$ is injective, find its image $\mathcal{U}\subset M$, define a chart $(\mathcal{U}, \varphi = P^{-1})$ of $M$ (and similarly define another chart $(\mathcal{V}, \psi)$ so that $\{(\mathcal{U}, \varphi), (\mathcal{V}, \psi)\}$ is an atlas. Prove that there is a unique riemannian metric $g$ on $M$ such that its local expression in the chart $(\mathcal{U}, \varphi)$ si $$g^{\varphi} = du_1^2 + du_2^2 + \frac{1}{(1+u^2)^2}du^2$$
Showing that $P$ is injective has been no problem, but I am unable to find it's image. Also I can't find the inverse map $P^{-1}$. I believe that if I had at least $P^{-1}$ I could prove the last question about the local representation of the metric $g$, but I am stuck at the beginning. Thank you.