Formula of the gravitational force between two particles:

where
is the gravitational constant
m1 and m2 are the masses of the two particles
r is their distance
(a) particle A
The gravitational force exerted by particle B on particle A is
to the right
The gravitational force exerted by particle C on particle A is
to the right
So the net gravitational force on particle A is
to the right
(b) Particle B
The gravitational force exerted by particle A on particle B is
to the left
The gravitational force exerted by particle C on particle B is
to the right
So the net gravitational force on particle B is
to the right
(c) Particle C
The gravitational force exerted by particle A on particle C is
to the left
The gravitational force exerted by particle B on particle C is
to the left
So the net gravitational force on particle C is
to the left