This question deals with the properties of substances and how they relate to their internal structure.
First, we of course need to understand what the property we are asked to evaluate means. Melting temperature is usually defined as the temperature at which the compound turns from solid to liquid.
Now take a while to recognise the substances we are examining and get a general feel for them. Think about what state they are in at room temperature.
MgO – magnesium oxide will be a white solid,
Na – sodium, will be a shiny metal
H2O – water – liquid
H2S – hydrogen sulphide – will be a gas, but you do not need to know this at the moment
NaCl – sodium chloride – the common kitchen salt – a white solid
So definitely the H2S will have the lowest melting temperature, followed by H2O. If you didn’t know what state H2S is at room temperature, remember that although they are roughly the same size and have similar composition (hydrogen bonded to a non-metallic element), H2O contains the highly-electronegative oxygen, so it will form hydrogen bonds, which are much stronger than the weakly polar interactions in H2S. And stronger bonds are always associated with higher melting points.
So it’s H2S < H2O
Now of the three substances which are solid at room temperature, sodium will have the lowest melting point. In metals, the melting point is generally defined by the atomic radius and the charge of ions within the metallic lattice (make sure you remember what metallic bonding looks like). In the periodic table sodium is at the top of group 1, so it has a small atomic radius, and can only form singly charged Na+ ions, which results in a really low melting point.
So now it’s H2S < H2O < Na
The two compounds we have left – MgO and NaCl will both form Giant Ionic structures, which are quite sturdy, hence their high melting point. The melting point of a Giant Ionic structure is mostly determined by the size of the ions and the charge on them. The higher the charge, the stronger the attraction between ions and the higher the melting point. MgO exists as a lattice of Mg2+ and O2- ions, while NaCl only as Na+ and Cl- ions, so MgO will have a more rigid structure.
This gives use the final order:
H2S < H2O < Na < NaCl < MgO