Dear [b]Washim Chowdhury, [/b]this answer is also right. At first step amount of Na was found (0.15 moles). The amount of sodium equals the amount of sodium nitrate. So, to find the mass of sodium nitrate you can multiply the moles (0.15 moles) by the molecular weight of sodium nitrate. You'll get the mass of 0.15 moles of sodium nitrate that equals 0.15 moles (or 3.5 g in 50 ml) of sodium ions. Both methods of calculation give the same result.
As you say in last sentence, multiply the moles of NaNO3, but you did with moles of Na you got earlier. I know, you have followed the answer from yahoo. Interested ones, may visit for this answer - https://www.meritnation.com/ask-answer/question/how-much-nano3-must-be-weighed-out-to-make-50-ml-of-an-aqueo/chemistry/5488184