T = X/Y .... (2)
From (1) and (2):
X = ST/(1 + T)
Y = S/(1 + T)
This distribution is obviously equivalent to and there's no problem that I can see.
Edit: I see that you get it now. Excellent. Now the trick is to derive the given joint distribution for S and T from the distributions for X and Y lol!