For the problem with m and x, it looks like you messed up when expanding a squared term. After creating a common denominator, this should be your subtraction problem.
\(\displaystyle \frac{m+x}{m-x}-\frac{m^2}{m^2-x^2}=\frac{\left(m+x\right)^2}{\left(m-x\right)\left(m+x\right)}-\frac{m^2}{\left(m-x\right)\left(m+x\right)}\)
Hint: \(\displaystyle \left(m+x\right)^2\ne m^2+x^2\)
---
As for a2 - b2 = (a+b)(a-b), you can think of it kind of like a quadratic, where b is like the constant term. For instance, if we had:
x2 - 9 = x2 + 0x - 9 = (x+?)(x+?)
To factor this quadratic, we need to find two numbers which multiply to 9, and add to 0. So, 3 and -3 will work. Thus we have (x+3)(x-3). Similarly:
a2 - b2 = a2 + 0a - b^2 = (a+?)(a+?)
Here, we need two numbers which multiply to b2, and add to 0. The only way two numbers can add to zero is if they're negatives of each other, so then we know:
a2 - b2 = (a+b)(a-b)