Let $a$, $b$, $c$ be the sidelengths of $BC$, $CA$, $AB$, let $h_1$ be the height from $B$ to $AC$, and let $h_2$ be the height from $B$ to $UV$. Note that $\dfrac{UV}{AC} = \dfrac{h_2}{h_1}$ because of the similar triangles you mentioned. Also, $h_2 = h_1 - 2r$ where $r$ is the inradius of triangle $ABC$. Hence $$\dfrac{UV}{AC} = \dfrac{h_1-2r}{h_1} = 1-\dfrac{2r}{h_1}.$$ Now let $K$ be the area of triangle $ABC$. We know $2K = h_1b = r(a+b+c)$, so $$\dfrac{r}{h_1} = \dfrac{2K/h_1}{2K/r} = \dfrac{b}{a+b+c}.$$ Thus $$\dfrac{UV}{AC} = 1-\dfrac{2b}{a+b+c} = \dfrac{a-b+c}{a+b+c} = \dfrac{y}{x+y+z}.\ \blacksquare$$ (Notes: The last step follows from $x = (b+c-a)/2, y=(c+a-b)/2, z=(a+b-c)/2$, which is well-known. To get the formula $2K = r(a+b+c)$, note that $K$ is the sum of the areas of triangles $IAB$, $IBC$, and $ICA$.)