If $X,Y$ are independent and have same geometric distribution with parameter $p$, find the distribution of $Z=\frac{X}{X+Y}$.
The solution is $$\mathbb{P}\left(Z=\frac{m}{n}\right)=\sum_k\mathbb{P}(X=km,Y=k(n-m))=\frac{p^2(1-p)^{n-2}}{1-(1-p)^n}\label{1}\tag{1}$$
But I want to solve this problem by using a bivariate transformation. Let $W=X+Y$: then
\begin{align} \mathbb{P}(Z=z,W=w) & =\mathbb{P}(X=wz,Y=w(1-z)) \\ & =(1-p)^{wz-1}p(1-p)^{w(1-z)-1}p \\ & =p^2(1-p)^{w-2}\label{2}\tag{2} \end{align}
$W$ take values in $\{2,3,\ldots\}$, for $z\in (0,1)$: $$\mathbb{P}(Z=z)=\sum_{w=2}^{\infty}p^2(1-p)^{w-2}=p\label{3}\tag{3}$$
It is wrong but I can't figure out why.
Q1: At first I think the reason is that $Z$ is not a discrete RV, so I can't use bivariate transformation \eqref{2} in the discrete way, but how to bivariate transform $W,Z$? One is discrete, the other is continuous.
Q2: But when I write $Z=m/n$ in \eqref{3}, then $W$ can only take values in $kn$, then $$\mathbb{P}\left(Z=\frac{m}{n}\right)=\sum_k p^2(1-p)^{kn-2}=\frac{p^2(1-p)^{n-2}}{1-(1-p)^n}$$ which is the right answer. So I'm confused that can we bivariate transform in \eqref{2} when $Z$ is continuous? in my opinion, continuous RV always come with Jacobian.
In a word, I want to know either if \eqref{2} is wrong or \eqref{3} is wrong.