Taking into account that
[tex]\begin{gathered} g_A=2g_B \\ \text{Where } \\ g_A\Rightarrow\text{ gravity on the surface of the planet A} \\ g_B\Rightarrow\text{ gravity on the surface of the planet B} \end{gathered}[/tex]And that the relationship between weight, mass and acceleration is
[tex]w=m\cdot g[/tex]So you have,
[tex]\begin{gathered} w_A=m\cdot g_A \\ \text{ but you know that }g_A=2g_B,\text{ so you can replace} \\ w_A=m\cdot2g_B \\ w_A=2m\cdot g_B \\ w_A=2w_B \end{gathered}[/tex]Therefore, the ratio of the weight of mass X on the surface of planet A to its weight on the surface of planet B is 1:2.