a^2 - 2ab + b^2 / a - b
Please use parentheses. I assume you wanted to say (a^2 - 2ab + b^2) / (a-b)
$\displaystyle \frac{a^2 - 2ab + b^2}{a-b}$
Do you know that $\displaystyle a^2 - 2ab + b^2 = (a-b)^2$ ?
If you didn't know, you learned now
$\displaystyle \frac{(a-b)^2}{a-b}$
$\displaystyle \frac{(a-b)(a-b)}{(a-b)}$
$\displaystyle \boxed{~a-b~}$
$\displaystyle \frac{a^2 - 2ab + b^2}{a+b}$
Well, there's nothing much to do with this fraction.. Start with adding and subtracting $\displaystyle 4ab$,
$\displaystyle \frac{a^2 - 2ab + b^2 + 4ab - 4ab}{a + b}$
$\displaystyle \frac{a^2 + 2ab + b^2 - 4ab}{a + b}$
$\displaystyle \frac{(a+b)^2 - 4ab}{a + b}$
$\displaystyle \frac{(a+b)^2}{a + b} - \frac{4ab}{a + b}$
$\displaystyle a + b - \frac{4ab}{a + b}$