Áp dụng tính chất dãy tỉ số bằng nhau ta có:
\(\frac{a+b-c}{c}=\frac{a-b+c}{b}=\frac{-a+b+c}{a}=\frac{a+b-c+a-b+c-a+b+c}{a+b+c}=\frac{\left(a+b+c+a+b+c\right)-\left(a+b+c\right)}{a+b-c}=\frac{a+b+c}{a+b+c}=1\)
\(=>\frac{a+b-c}{c}=1=>a+b-c=c=>a+b=c+c=2c\)
\(=>\frac{a-b+c}{b}=1=>a-b+c=b=>a+c=b+b=2b\)
\(=>\frac{-a+b+c}{a}=1=>-a+b+c=a=>b+c=a+a=2a\)
\(=>M=\frac{\left(a+b\right)\left(b+c\right)\left(c+a\right)}{abc}=\frac{2c.2a.2b}{abc}=\frac{8.abc}{abc}=8\)
Vậy M=8