a) \(\frac{\left(a+b\right)^2-c^2}{a+b+c}=\frac{\left(a+b+c\right)\left(a+b-c\right)}{a+b+c}=a+b-c\)
b ) \(\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+ac+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}\)