To calculate mass in g we first need moles of NaOH for this preparation. For this purpose we use the formula
Molarity = no.of moles / solution in liter
Here we have
Molarity= 1.5M
Solution = 150ml
Convert it into liter we get
150/1000 = 0.15L
Putting in
No.of moles = molarity x solution in liter
= 1.5 x 0.15 = 0.225mole of NaOH
Now we can use these moles to calculate mass in gram by formula
No.of moles = mass in gram/molar mass
Molar mass of NaOH is 39.997g/mol
Now use
Mass in gram= no.of mole x molar mass of NaOH
= 0.225 x 39.997
= 8.999g = 9g
So
9g of NaOH is required to make 150ml of 1.5M solution.