\(\hept{\begin{cases}\frac{ab}{a+b}=\frac{bc}{b+c}\Rightarrow ab.\left(b+c\right)=\left(a+b\right).bc=ab^2+abc=abc+b^2c\\\frac{bc}{b+c}=\frac{ca}{c+a}\Rightarrow\left(a+c\right).bc=\left(b+c\right).ac\Rightarrow abc=c^2a=abc+c^2b\end{cases}}\)
\(\Rightarrow\hept{\begin{cases}a=c\\a=b\end{cases}\Rightarrow a=b=c\Rightarrow M=\frac{ab+bc+ca}{a^2+b^2+c^2}=\frac{a^2+b^2+c^2}{a^2+b^2+c^2}=1}\)