Concept:
If two vectors have equal magnitudes, then the squares of their magnitudes are also equal.
That is,
\[
|\vec{u}|=|\vec{v}|
\]
implies
\[
|\vec{u}|^2=|\vec{v}|^2.
\]
This avoids square roots and simplifies calculations.
Step 1: Find \(\vec{a}-2\vec{b}\).
Given
\[
\vec{a}=x\hat{i}+2\hat{j}-\hat{k},
\]
\[
\vec{b}=2\hat{i}-\hat{j}+2\hat{k}.
\]
Therefore,
\[
\vec{a}-2\vec{b}
=
(x\hat{i}+2\hat{j}-\hat{k})
-2(2\hat{i}-\hat{j}+2\hat{k}).
\]
\[
=
x\hat{i}+2\hat{j}-\hat{k}
-4\hat{i}+2\hat{j}-4\hat{k}.
\]
\[
=
(x-4)\hat{i}+4\hat{j}-5\hat{k}.
\]
Hence,
\[
|\vec{a}-2\vec{b}|^2
=
(x-4)^2+4^2+(-5)^2.
\]
\[
=
(x-4)^2+41.
\]
Step 2: Find \(2\vec{a}+\vec{b}\).
\[
2\vec{a}+\vec{b}
=
2(x\hat{i}+2\hat{j}-\hat{k})
+(2\hat{i}-\hat{j}+2\hat{k}).
\]
\[
=
2x\hat{i}+4\hat{j}-2\hat{k}
+2\hat{i}-\hat{j}+2\hat{k}.
\]
\[
=
(2x+2)\hat{i}+3\hat{j}.
\]
Thus,
\[
|2\vec{a}+\vec{b}|^2
=
(2x+2)^2+3^2.
\]
\[
=
(2x+2)^2+9.
\]
Step 3: Use the given condition.
Since
\[
|\vec{a}-2\vec{b}|=|2\vec{a}+\vec{b}|,
\]
we have
\[
(x-4)^2+41
=
(2x+2)^2+9.
\]
\[
x^2-8x+16+41
=
4x^2+8x+4+9.
\]
\[
x^2-8x+57
=
4x^2+8x+13.
\]
\[
3x^2+16x-44=0.
\]
Step 4: Solve the quadratic equation.
\[
3x^2+16x-44
=
(3x+22)(x-2).
\]
\[
(3x+22)(x-2)=0.
\]
Therefore,
\[
x=-\frac{22}{3}
\quad \text{or} \quad
x=2.
\]
Since
\[
x>0,
\]
we get
\[
x=2.
\]
Step 5: Write the final answer.
\[
\boxed{2}
\]