When a substance is dissolved in a solvent it reduces the freezing point of the solvent. The decrease in the temperature at which the liquid freezes is given by a relation derived by Ebbing as dT = Kf*cm, where Kf is a constant for every liquid and cm is the molality of the solution after the impurity has been dissolved.
For water the freezing-point-depression constant is 1.858.
Let the molecular mass of the unknown substance be m, when 5 g of this is added to 25 g of water the molality is (5/m)/25. The new freezing point is -2.5 degrees Celsius, or there is a drop of 2.5 degree Celsius.
This gives dT = 2.5 = 1.858*mc
=> mc = 2.5/1.858 = 1.345
(5/m)/25 = 1.345
=> m = 0.1486 g
This gives the molecular mass of the unknown compound as 0.1486 g