if i wanted to solve for r:

s=(a/1-r)

s = a/(1-r)

(1-r)s = s - rs = a
s-a = rs
r = (s-a)/s = 1 - (a/s)