Answer
We can rank the planets according to mass:
$1 = 2 \gt 3 = 4$
Work Step by Step
We can write an expression for $a_g$ when $r$ is equal to or greater than a planet's radius:
$a_g = \frac{G~M}{r^2},~~~~$ where $M$ is a planet's mass
On the graph given in the question, we can consider $a_g$ of each planet at the point $r = R_4$
Since $a_g$ is greater for planets 1 and 2 then planets 3 and 4, the mass of planets 1 and 2 must be greater than the mass of planets 3 and 4.
We can rank the planets according to mass:
$1 = 2 \gt 3 = 4$