Use Difference of Squares: \({a}^{2}-{b}^{2}=(a+b)(a-b)\).
\[\begin{aligned}&(a+b)(a-b)\\&\frac{2}{a+b}-\frac{2}{a-b}+\frac{4a}{(a+b)(a-b)}\end{aligned}\]
Rewrite the expression with a common denominator.
\[\begin{aligned}&\frac{(a+b)(a-b)\\&2(a-b)-2(a+b)+4a}{(a+b)(a-b)}\end{aligned}\]
Expand.
\[\frac{{a}^{2}-{b}^{2}-2a-2b+4a}{(a+b)(a-b)}\]
Collect like terms.
\[\frac{{a}^{2}-{b}^{2}+(-2a+4a)-2b}{(a+b)(a-b)}\]
Simplify \({a}^{2}-{b}^{2}+(-2a+4a)-2b\) to \({a}^{2}-{b}^{2}+2a-2b\).
\[\frac{{a}^{2}-{b}^{2}+2a-2b}{(a+b)(a-b)}\]
Factor with quadratic formula.
In general, given \(a{x}^{2}+bx+c\), the factored form is:
\[a(x-\frac{-b+\sqrt{{b}^{2}-4ac}}{2a})(x-\frac{-b-\sqrt{{b}^{2}-4ac}}{2a})\]
In this case, \(a=1\), \(b=2\) and \(c=-{b}^{2}-2b\).
\[(a-\frac{-2+\sqrt{{2}^{2}-4(-{b}^{2}-2b)}}{2})(a-\frac{-2-\sqrt{{2}^{2}-4(-{b}^{2}-2b)}}{2})\]
Simplify.
\[(a-b)(a+b+2)\]
\[\frac{(a-b)(a+b+2)}{(a+b)(a-b)}\]
Cancel \(a-b\).
\[\frac{a+b+2}{a+b}\]
(a+b+2)/(a+b)