Solving for M1 in terms of Fg, G, M2 and r yields;
M1 = Fr²/GM2
To solve for M1 in terms of F, G, M2 and r;
We are required to make M1 the subject of the formula as follows;
F = (G M1M2)/r²
By cross product;
Fr² = G M1M2
Afterwards; by dividing through by G M2; we have;
M1 = Fr²/GM2
:)