Answer:
F = M a is Newton"s Second Law
W = M g is the weight of the mass (W = 2 kg * 10 m/s) = 20 Newtons
g provides a downward acceleration of 10 m/s^2
F = M a = (12 - 10) m/s^2 * 2 kg = 4 kg m/s^2
The example that you gave shows both accelerations in the same direction which is not correct. your example would show the reading on a scale, if the person was on a scale - 10 m/s^2 + 2 m/s^2 = 12 m/s^2 which is offset by the person's weight of 10 m/s^2 in the other direction.
Draw a diagram showing the forces acting on mass M and the resulting acceleration a.