Not sure but from your diagram, I assume that you have two epicyclic trains with a moving common ring gear, I'll call R
The sungear on left train call S1, and the carrier C1 which is linked to the outpuit sungear S2 and the carrier on the 2nd train is fixed.
I think it goes like this:
temporarily uncouple the linkage C1 to S2
1)rotate the ring -1, keeping C2 =0,C1=0
R=-1
C2=0, C1=0
s2=Nr/Ns2
S1=Nr/Ns
3)Now rotate each train +1 including R to make
R=0
S1=1+Nr/Ns1
C1=1
S2=1+Nr/Ns2
C2=1
This part is fairly standard .
Next, to make C1=S2, the train1 is sped up by factor(1+Nr/Ns2)( train2 is not changed).Now reconnect the linkage between C1 and S2 and rotate the linked assenmbly -1 (to make C2=0 and R=-1). which yields
S1=(Nr/Ns1+1)(Nr/Ns2+1)-1
S2=Nr/Ns2
S1/S2=Nr/Ns1+Ns2/Ns1+1
Please check this.