If $X\sim\operatorname{Gamma}(r,1)$, $Y\sim\operatorname{Gamma}(s,1)$, find the distribution $Z\sim X/(X+Y)$.

I think I have the right answer, but I do not understand why the first try failed or if the convolution method is not applicable in other problems or how to apply it if it is

What I tried:

Try 1: Note $0 \leq Z\leq 1$ and $\frac{t}{t+(1/z-1)t} = z$, suggests the substitutions $X=t$, $Y=(1/z-1)t$ and taking the convolution.
\begin{equation}
f\_Z (z) = \int\_0^\infty \frac{1}{\Gamma (r) \Gamma(s)}t^{r-1} \left((z^{-1}-1)t \right)^{s-1} e^{-t}e^{-(z^{-1}-1)t} (z^{-1}-1) \, dt
\end{equation}
where $(z^{-1}-1)$ is multiplied since subtituting $y=(1/z-1)t$ made $Y$ go $1/z-1$ too fast so multiplying by $(1/z-1)$ renormalizes the area of the pdf. Then

\begin{align}
f\_Z (z) = \frac{(z^{-1}-1)^s}{\Gamma(r)\Gamma(s)} \int\_0^\infty t^{r+s-2}e^{-t/z} \, dt &= \frac{(z^{-1}-1)^s z^{r+s-1}}{\Gamma(r)\Gamma(s)}\Gamma(r+s-1) \\
&= \frac{(1-z)^s z^{r-1}}{(r-1)B(s,r-1)}
\end{align}  

which does not integrate to $1$.

Try $2$: Maybe the $(z^{-1}-1)$ fudge factor was wrong? In any case
\begin{equation}
F\_Z (z) = P(X/(X+Y) \leq z) = \int\_0^\infty \int\_{(z^{-1}-1)x}^\infty \frac{1}{\Gamma(r)\Gamma(s)}x^{r-1}y^{s-1}e^{-x}e^{-y} \, dy \, dx
\end{equation}
So
\begin{align}
f\_Z (z) = \frac{d}{dz}F\_Z (z) &= \int\_0^\infty \frac{d}{dz} \int\_{(z^{-1}-1)x}^\infty \frac{1}{\Gamma(r)\Gamma(s)}x^{r-1}y^{s-1}e^{-x}e^{-y} \,dy \,dx \\
&= \frac{1}{\Gamma(r)\Gamma(s)} \int\_0^\infty \frac{x}{z^2} x^{r-1} ((z^{-1}-1)x)^{s-1} e^{-x}e^{-(z^{-1}-1)x} \, dx \\
&= \frac{(z^{-1}-1)^{s-1}}{z^2\Gamma(r)\Gamma(s)} \int\_0^\infty x^{r+s-1} e^{-x/z} \,x \\
&= \frac{(z^{-1}-1)^{s-1}z^{r+s}}{z^2 \Gamma(r)\Gamma(s)} \Gamma(r+s) \\
&= \frac{(1-z)^{s-1} z^{r-1}}{B(r,s)}
\end{align}

which seems to be the right answer