The weight of the meterstick is:

and this weight is applied at the center of mass of the meterstick, so at x=0.50 m, therefore at a distance

from the pivot.
The torque generated by the weight of the meterstick around the pivot is:

To keep the system in equilibrium, the mass of 0.50 kg must generate an equal torque with opposite direction of rotation, so it must be located at a distance d2 somewhere between x=0 and x=0.40 m. The magnitude of the torque should be the same, 0.20 Nm, and so we have:

from which we find the value of d2:

So, the mass should be put at x=-0.04 m from the pivot, therefore at the x=36 cm mark.