Ta có :
\(\frac{a^2+b^2-c^2+2ab}{a^2-b^2+c^2+2ac}\)
\(=\frac{a^2+2ab+b^2-c^2}{a^2+2ac+c^2-b^2}\)
\(=\frac{\left(a+b\right)^2-c^2}{\left(a+c\right)^2-b^2}\)
\(=\frac{\left(a+b+c\right)\left(a+b-c\right)}{\left(a+c+b\right)\left(a+c-b\right)}=\frac{a+b-c}{a-b+c}\)
\(\frac{a^2+b^2-c^2+2ab}{a^2-b^2+c^2+2ac}=\frac{\left(a+b\right)^2-2ab-c^2+2ab}{\left(a+c\right)^2-2ac-b^2+2ac}.\)
\(=\frac{\left(a+b\right)^2-c^2}{\left(a+c\right)^2-b^2}\)
\(=\frac{\left(a+b-c\right)\left(a+b+c\right)}{\left(a+c-b\right)\left(a+b+c\right)}\)
\(=\frac{a+b-c}{a+c-b}\)