5. Given real numbers $x, y$ satisfy the equation $x^{2}+y^{2}-2 x+4 y=0$, find the maximum and minimum values of $x-2 y$.

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
5. Let $\vec{a}=(x-1, y+2), \vec{b}=(1,-2)$, from $x^{2}+y^{2}-2 x+4 y=0$ we get
$$
\begin{aligned}
5 & =x^{2}+y^{2}-2 x+4 y+5=(x-1)^{2}+(y+2)^{2} \\
& =|\vec{a}|^{2} \geqslant \frac{(\vec{a} \cdot \vec{b})^{2}}{|\vec{b}|^{2}}=\frac{(x-1-2 y-4)^{2}}{1^{2}+(-2)^{2}}=\frac{(x-2 y-5)^{2}}{5},
\end{aligned}
$$

then $(x-2 y-5)^{2} \leqslant 25,|x-2 y-5| \leqslant 5$,
$$
-5 \leqslant x-2 y-5 \leqslant 5,0 \leqslant x-2 y \leqslant 10,
$$

so the minimum value of $x-2 y$ is 0, and the maximum value is 10.