If you use Vi-Vf then you would change the signs. Vi -Vf = -(Vf-Vi). When you calculated it you used Vf-Vi.
BTW, Vr1 + Vr2 - M = 0.
When you start at the bottom, you first go into the - side of the battery, and then into the + side of two resistors.
Read the wikipedia page on kirchhoffs voltage law.