Using the equation we get something like this:
M = moles of solute/ liters of solution
But we need the number of moles of solute right? so we gotta arrange the equation to make it fit our needs.
M x liters of solution = moles of solute
M = mol/L
Liters of solution = L
moles of solute = mol
We have the M which stands for the molar mass in mol/L (0.4M)
And we also have the mL which are the liters of our solution, yet to be converted into liters. Let's divide them by a 1000 to make it into liters.
250mL / 1000 = 0.250L
Now we can multiply them! and find the number of moles of solute by replacing them, remember M can be changed into m/mol, because it's pretty much the same but written in another way.
0.4mol/L x 0.250L = 0.1 mol
The liters canceled, and we end up with mol. So, the answer is 0.1 mol.