show that $(-1,1)$ and $\mathbb{R}$ are isometric

I want to find a metric $d'$ sucht that $(\mathbb{R}, d')$ and $(X, d)$ with $X = (-1,1)$ and $d(x,y) = |x-y|$ are isometric. I tried the homeomorphisms $$f:\mathbb{R} \to (-1,1) ~ \textrm{ with } ~ x \mapsto \frac{1}{x+1} + \frac{1}{x-1}$$ and $$g:(-1,1) \to \mathbb{R} ~ \textrm{ with } ~ x \mapsto \tan\left(\frac{\pi}{2} x\right)$$ but i have no idea how to find the metric $d'$?

-
Let $\phi\colon \mathbb R \to (-1,1)$ a homeomorphism. Define $d'(x,y) := \left|\phi(x) - \phi(y)\right|$. Then $d$ is as wished and $\phi$ is an isometry. –  martini Oct 16 '12 at 10:20

Once you pick your favorite homeomorphism $h:\Bbb R\to (-1,1)$, you can define $$d'(a,b):=d(h(a),h(b))$$ And this is applicable to your functions by $h:=f$ or $h:=g^{-1}$.
If you have a injective $f : \mathbb{R} \to X$, you can use that to define a metric $d'$ on $\mathbb{R}$ which makes $f$ isometric. Just set $$d'(x,y) = |f(x) - f(y)|$$