First you need to find the number of moles there are in 89g of Mg(NO₃)₂ . To do this, divide the 89g by the molar mass of magnesium nitrate (148.3g/mol) to get 0.6mol of magnesium nitrate. Then to find the volume of solution that contains 0.6 moles you need to divide 0.6mol by 0.40M to get 1.5L of solution.
I hope this helps. Let me know in the comments if anything is unclear.