This is pretty trivial algebra. If you are having trouble with this you need to find some help with your math.
[tex]F_g = \frac {G M_1 M_2} {r^2}[/tex]
I will do r^2 for you, you should be able to puzzle out the rest.
Multiply both sides by [itex]r^2[/itex]
[tex]F_g r^2 = \frac {G M_1 M_2 r^2} {r^2}[/tex]
Cancel the [itex]r^2[/itex] in the Right hand side.
[tex]F_g r^2 = G M_1 M_2[/tex]
Now divide both sides by [itex]F_g[/itex]
[tex]\frac {F_g r^2 } {F_g} = \frac {G M_1 M_2} {F_g}[/tex]
Now cancel the [itex]F_g[/itex] in the Left hand side to get
[tex]r^2 = \frac {G M_1 M_2} {F_g}[/tex]
Similar operations will isolate the other quantities you need.