Let $x\hat{i} + y\hat{j} + z\hat{k}$ be the required unit vector.
Since $\hat{a}$ is perpendicular to $\left(2\hat{i} -\hat{j}+ 2\hat{k}\right)$.
$\therefore\quad2x - y + 2z = 0 \quad\quad...........\left(i\right)$
Since vector $x\hat{i} + y\hat{j} + z\hat{k}$ is coplanar with the vector $\hat{i} + \hat{j} - \hat{k} and 2\hat{i} + 2\hat{j} - \hat{k}$.
$\therefore\quad x\hat{i} + y\hat{j} + z\hat{k}$
$= p\left(\hat{i} + \hat{j} - \hat{k}\right)+q \left(2\hat{i} + 2\hat{j} + \hat{k}\right)$,
where p and q are some scalars.
$\Rightarrow\quad x\hat{i} + y\hat{j} + z\hat{k}$
$= \left(p+2q\right)\hat{i} + \left(p+2q\right)\hat{j} - \left(p+q\right)\hat{k}$
$\Rightarrow\quad x=p + 2q, \,y=p + 2q,\,z = -p-q$
Now from equation $\left(i\right)$,
$2p + 4q - p -2q - 2p - 2q = 0$
$\Rightarrow\quad- p = 0\quad\Rightarrow\quad p = 0$
$\therefore\quad x = 2q,\, y = 2q,\, z = - q$
Since vector $x\hat{i} + y\hat{j} + z\hat{k}$ is a unit vector, therefore
$\left|x\hat{i} + y\hat{j} + z\hat{k}\right| = 1$
$\Rightarrow\quad\sqrt{x^{2}+y^{2}+z^{2}} = 1$
$\Rightarrow\quad x^{2} + y^{2} + z^{2} = 1$
$\Rightarrow\quad4 q^{2} + 4 q^{2} + q^{2 }= 1$
$\Rightarrow\quad9q^{2} = 1\quad\Rightarrow\quad q = \pm \frac{1}{3}$
When $q = \frac{1}{3}$, then $x= \frac{2}{3}, y = \frac{2}{3}$,
$z = -\frac{1}{3}$
When $q = -\frac{1}{3}$, then $x = -\frac{2}{3}, y = -\frac{2}{3}$,
$z = \frac{1}{3}$
Here required unit vector is $\frac{2}{3}\hat{i}+\frac{2}{3}\hat{j} - \frac{1}{3}\hat{k}$
or $- \frac{2}{3}\hat{i}-\frac{2}{3}\hat{j} + \frac{1}{3}\hat{k}.$