For a domain $\Omega \subset \mathbb{C}$ and a $\rho: \Omega \rightarrow \mathbb{R}_0^+$, define the distance by: $d_\rho (z_1,z_2) = \inf\limits_{\gamma \in C^1 (z_1,z_2)} \int_0^1 \rho(\gamma(t))\cdot|\dot{\gamma}(t)| \,dt,$ where $C^1(z_1,z_2)$ is the space of smooth paths $\gamma: [0,1] \rightarrow \Omega$ such that $\gamma(0)=z_1$ and $\gamma(1)=z_2$.
I need to show that this satisfies $d_\rho (z_1,z_2) \leq d_\rho (z_1,w) + d_\rho (w,z_2)$.
I'm not very confident in what I did, which was to choose two paths $\gamma_1 \in C^1(z_0,w)$ and $\gamma_2 \in C^1(w,z_1)$, with $\dot{\gamma}_1 (1) = \dot{\gamma}_2(0)$ and $\int_0^1 \rho(\gamma_1(t))\cdot|\dot{\gamma}_1(t)| \,dt = d_\rho (z_1,w) + \varepsilon/2,\\ \int_0^1 \rho(\gamma_2(t))\cdot|\dot{\gamma}_2(t)| \,dt = d_\rho (w,z_2) + \varepsilon/2$ for some arbitrary $\varepsilon>0$.
Then a path $\gamma\in C^1(z_1,z_2)$ which is a concatenation of $\gamma_1$ and $\gamma_2$ has length $\int_0^1 \rho(\gamma(t))\cdot|\dot{\gamma}(t)| \,dt \leq d_\rho(z_1,w) + d_\rho(w,z_2) + \varepsilon.$ Thence $d_\rho (z_1,z_2) \leq d_\rho(z_1,w) + d_\rho(w,z_2) + \varepsilon,$ and since $\varepsilon$ is arbitrary, $d_\rho (z_1,z_2) \leq d_\rho(z_1,w) + d_\rho(w,z_2).$