Earth and moon gravitational ratios and proportionalities
The first part is just replacing $M$ with $M_E$ and so forth. You get two statements of proportionality, one with the $E$ values and one with the $M$ values.
The second part is algebraic division.  Mathematically if $a\propto  b$,  and if $a_1,a_2,b_1,b_2$ are specific values that are in this proportion. $a_1=kb_1$ and $a_2=kb_2$ for some constant $k$. Division gives $a_1/a_2 = b_1/b_2$.  The constants  cancel
By division, you turn a statement of proportionally into an equation.