Step 1: Isolate one vector before squaring, as an alternative route:
From $\vec a+\vec b+\vec c=0$, write $\vec c=-(\vec a+\vec b)$, so $|\vec c|^2=|\vec a+\vec b|^2=|\vec a|^2+2\vec a\cdot\vec b+|\vec b|^2$.
Step 2: Use this to find just $\vec a\cdot\vec b$ first:
$25 = 9+2\vec a\cdot\vec b+16 \Rightarrow 25=25+2\vec a\cdot\vec b \Rightarrow \vec a\cdot\vec b=0$.
Step 3: Repeat the same trick for $\vec b\cdot\vec c$ and $\vec c\cdot\vec a$ using the other two isolations $\vec a=-(\vec b+\vec c)$ and $\vec b=-(\vec c+\vec a)$:
For $\vec a=-(\vec b+\vec c)$: $9=16+2\vec b\cdot\vec c+25 \Rightarrow \vec b\cdot\vec c=\dfrac{9-41}{2}=-16$. For $\vec b=-(\vec c+\vec a)$: $16=25+2\vec c\cdot\vec a+9 \Rightarrow \vec c\cdot\vec a=\dfrac{16-34}{2}=-9$.
Step 4: Add all three dot products found:
$\vec a\cdot\vec b+\vec b\cdot\vec c+\vec c\cdot\vec a = 0+(-16)+(-9)=-25$, matching the quicker method.
Final Answer:
The sum equals $-25$.
\[ \boxed{-25} \]