The weight of an object can be calculated with the following formula:
[tex]w=m\cdot g[/tex]Where:
w = weight
m = mass
g = gravitation acceleration
For the first object we have:
[tex]\begin{gathered} w_1=m_1\cdot g \\ g=\frac{w_1}{m_1}=\frac{9N}{3\operatorname{kg}}=3\frac{N}{\operatorname{kg}} \end{gathered}[/tex]In the last equation we found the value of g. Now, we the value of g we can calculate the mass of the second object.
For the second object:
[tex]\begin{gathered} w_2=m_2\cdot g \\ m_2=\frac{w_2}{g}=\frac{24N}{3\frac{N}{\operatorname{kg}}}=8\operatorname{kg} \end{gathered}[/tex]Answer: the mass of the second object is 8 kg.