Answer
We can rank the arrangements according to the absolute value of the gravitational potential energy of each three-particle system, with the greatest first:
$(1) \gt (2) = (4) \gt (3)$
Work Step by Step
Note that the mass of each particle is $m$
We can write the expression for the gravitational potential energy in a system of two particles of mass $m$ a distance of $r$ apart:
$U = -\frac{G~m^2}{r}$
To find the total potential energy in a system of three particles, we need to sum the gravitational potential energy for each pair of particles.
We can find an expression for the absolute value of the gravitational potential energy in arrangement (1):
$\vert U \vert = \frac{G~m^2}{d}+\frac{G~m^2}{D}+\frac{G~m^2}{d}$
We can find an expression for the absolute value of the gravitational potential energy in arrangement (2):
$\vert U \vert = \frac{G~m^2}{d}+\frac{G~m^2}{D}+\frac{G~m^2}{\sqrt{d^2+D^2}}$
We can find an expression for the absolute value of the gravitational potential energy in arrangement (3):
$\vert U \vert = \frac{G~m^2}{d}+\frac{G~m^2}{D}+\frac{G~m^2}{d+D}$
We can find an expression for the absolute value of the gravitational potential energy in arrangement (4):
$\vert U \vert = \frac{G~m^2}{d}+\frac{G~m^2}{D}+\frac{G~m^2}{\sqrt{d^2+D^2}}$
Note that all four expressions are equal except for the third term in each expression.
We can compare the third term in each expression:
$\frac{G~m^2}{d} \gt \frac{G~m^2}{\sqrt{d^2+D^2}} \gt \frac{G~m^2}{d+D}$
We can rank the arrangements according to the absolute value of the gravitational potential energy of each three-particle system, with the greatest first:
$(1) \gt (2) = (4) \gt (3)$