Answer
$\color{blue}{r=1-\frac{a}{S}}$
Work Step by Step
Use the rule $\frac{a}{b}=\frac{c}{d}\longrightarrow ad=bc$ to obtain:
$$S(1-r)=a
\\S(1)-S(r)=a
\\S-rS=a$$
Subtract $S$ from both sides of the equation:
$$S-rS-S=a-S
\\-rS=a-S$$
Divide $-S$ to both sides of the equation:
$$\frac{-rS}{-S}=\frac{a-S}{-S}
\\r=\frac{a-S}{-S}
\\r=\frac{a}{-S} -\frac{S}{-S}
\\r=-\frac{a}{S}-(-1)
\\r=-\frac{a}{S} + 1
\\\color{blue}{r=1-\frac{a}{S}}$$