Molality of the solution is defined as the number of moles of a substance dissolved divided by the mass of the solvent:
Molality = number of moles / solvent mass
From the concentration of 39% (by mass) of HCl in water, we construct the following reasoning:
in 100 g solution we have 39 g hydrochloric acid (HCl)
number of moles = mass / molecular weight
number of moles of HCl = 39 / 36.5 = 1.07 moles
solvent (water) mass = solution mass - hydrochloric acid mass
solvent (water) mass = 100 - 39 = 61 g
Now we can determine the molality:
molality = 1.07 moles / 61 g = 0.018