Step 1: Expand the first condition
\((\vec a+3\vec b)\cdot(7\vec a-5\vec b)=0\) gives \(7|a|^2+16\,\vec a\cdot\vec b-15|b|^2=0\).
Step 2: Expand the second condition
\((\vec a-4\vec b)\cdot(7\vec a-2\vec b)=0\) gives \(7|a|^2-30\,\vec a\cdot\vec b+8|b|^2=0\).
Step 3: Solve
Subtract: \(46\,\vec a\cdot\vec b-23|b|^2=0\), so \(\vec a\cdot\vec b=\frac{|b|^2}{2}\).
Substitute into the second equation: \(7|a|^2-15|b|^2+8|b|^2=0\), so \(|a|=|b|\).
Step 4: Angle
\(\cos\theta=\frac{|b|^2/2}{|a||b|}=\frac12\), so \(\theta=\frac{\pi}{3}\).
Final Answer:
The angle is \(\frac{\pi}{3}\), option (D).
\[ \boxed{\text{(D) } \frac{\pi}{3}} \]