a,
\(\left(a-b\right)^2+\left(b-c\right)^2+\left(c-a\right)^2=4\left(a^2+b^2+c^2-ab-bc-ca\right)\)
\(\Leftrightarrow a^2-2ab+b^2+b^2-2bc+c^2+c^2-2ca+a^2=4\left(a^2+b^2+c^2-ab-bc-ca\right)\)
\(\Leftrightarrow2\left(a^2+b^2+c^2-ab-bc-ca\right)=4\left(a^2+b^2+c^2-ab-bc-ca\right)\)
\(\Leftrightarrow a^2+b^2+c^2-ab-bc-ca=2\left(a^2+b^2+c^2-ab-bc-ca\right)\)
\(\Leftrightarrow a^2+b^2+c^2-ab-bc-ca=0\)
\(\Leftrightarrow2\left(a^2+b^2+c^2-ab-bc-ca\right)=0\)
\(\Leftrightarrow2a^2+2b^2+2c^2-2ab-2bc-2ca=0\)
\(\Leftrightarrow\left(a-b\right)^2+\left(b-c\right)^2+\left(c-a\right)^2=0\)
\(\Leftrightarrow a=b=c\)
b,
\(a+b+c=2p\Leftrightarrow p=\dfrac{a+b+c}{2}\)
\(\Leftrightarrow\left(p-a\right)^2+\left(p-b\right)^2+\left(p-c\right)^2=3p^2-2pa-2pb-2pc+a^2+b^2+c^2\)
\(=3\left(\dfrac{a+b+c}{2}\right)^2-2\cdot\dfrac{a+b+c}{2}\cdot a-2\cdot\dfrac{a+b+c}{2}\cdot b-2\cdot\dfrac{a+b+c}{2}\cdot c+a^2+b^2+c^2\)
\(=3p^2-\left(a+b+c\right)^2+a^2+b^2+c^2=3p^2-4p^2+a^2+b^2+c^2=a^2+b^2+c^2-p^2\)