The key to this question is to remember that 1M means "1 mol per liter"
You can look up the molar mass of NaCl - 58.44 gram/mol
Now we know we want 1 mol per liter, and 500 mL is half a liter, so we want half a mol - or 29.22 grams.
Does that make sense? Let me know!