I would have moved m to the other side to have more positive numbers than negatives (which
1) wm + wn = xm - xn
2) xn + wn = xm - wm
3) n (x + w) = m (x - w)
4) [n (x + w)]/(x - w) = m
which is the same as
5) m = [n (x + w)]/(x - w)
Now for your problem with orders, x-w is not the same as w-x, 4-3= 1 is not the same as 3-4= -1
You can see in line 2 i put first xn and then wn even though wn was on that side in the first place, in this case it doesn matter because you're adding numbers, wn + xn is the same as xn + wn. Same with -wn - xn, you're adding negative numbers, it's still addition. The problems come when subtracting numbers (essentially adding negative and positive numbers together, in this case the order does matter)
In step 2 you did what you're supposed to do. wn was on that side first so you put it first, then you put -xm