Write the force of attraction between 2 bodies with the formula f = G mm

r2

Correct.

f=GMm/r²
is the force of attraction between two bodies.
M and m are the masses
r is the distance between the centres of the bodies
and
G is the gravitational constant, equal to 6.67300 × 10-11 m3 kg-1 s-2