$\bar{r} \cdot \bar{n}_1=d_1$ and $\bar{r}, \bar{n}_2=d_2$ is given by
$\cos \theta=\left|\frac{\bar{n}_1 \cdot \bar{n}_2}{\left|\bar{n}_1\right|\left|\bar{n}_2\right|}\right|$
Here,
$\begin{aligned} & \bar{n}_1=-2 \hat{i}+\hat{j}+2 \hat{k} \\ & \bar{n}_2=2 \hat{i}+2 \hat{j}+\hat{k} \\ & \therefore \bar{n}_1 \cdot \bar{n}_2 \\ & =(2 \hat{i}+\hat{j}+2 \hat{k}) \cdot(2 \hat{i}+\hat{j}+\hat{k})\end{aligned}$
= (1)(2) + (1)(1) + (2)(1) = 2 + 1 + 2 = 5 Also,
$\begin{aligned} & \left|\bar{n}_1\right|=\sqrt{1^2+1^2+2^2}=\sqrt{6} \\ & \left|\bar{n}_2\right|=\sqrt{2^2+(-1)^2+1^2}=\sqrt{6}\end{aligned}$
$\therefore$ from $(1)$, we have
$\begin{aligned} & \cos \theta=\left|\frac{3}{\sqrt{6} \sqrt{6}}\right| \\ & =\frac{3}{6} \\ & =\frac{1}{2} \cos 90^{\circ} \\ & \therefore \theta=90^{\circ} .\end{aligned}$
