Solution (source code)

= Solution

With <normal vector> $n=(-1,-2,2)$, a <plane> through $A=(2,-1,1)$ has equation $n\cdot(r-A)=0$. As $n\cdot A=2$, its <plane equation> is
$$
\boxed{-x-2y+2z=2.}
$$
The <distance from a point to a plane> is the absolute signed offset divided by the <Euclidean norm> of its <normal vector>. Hence the <Euclidean distance> from the origin is $\boxed{2/3}$, since $|n|=3$. The closest point is $2n/9=(-2,-4,4)/9$, whose <Euclidean distance> from the origin is $2/3$ and which satisfies the <plane equation>.