The teacher hasn't uploaded a solution for this question yet.
The lines are given in the form $\vec{r} = \vec{a_1} + \lambda\vec{b_1}$ and $\vec{r} = \vec{a_2} + \mu\vec{b_2}$. Here, $\vec{a_1} = \hat{i} + 2\hat{j} + \hat{k}$, $\vec{b_1} = \hat{i} - \hat{j} + \hat{k}$, $\vec{a_2} = p\hat{i} - \hat{j} - \hat{k}$, and $\vec{b_2} = 2\hat{i} + \hat{j} + 2\hat{k}$.
The shortest distance formula requires $\vec{b_1} \times \vec{b_2}$: $$\vec{b_1} \times \vec{b_2} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ 1 & -1 & 1 \\ 2 & 1 & 2 \end{vmatrix} = \hat{i}(-2-1) - \hat{j}(2-2) + \hat{k}(1+2) = -3\hat{i} + 3\hat{k}$$ The magnitude is $|\vec{b_1} \times \vec{b_2}| = \sqrt{(-3)^2 + 0^2 + 3^2} = \sqrt{18} = 3\sqrt{2}$.
$\vec{a_2} - \vec{a_1} = (p-1)\hat{i} - 3\hat{j} - 2\hat{k}$. The dot product $(\vec{a_2} - \vec{a_1}) \cdot (\vec{b_1} \times \vec{b_2}) = ((p-1)\hat{i} - 3\hat{j} - 2\hat{k}) \cdot (-3\hat{i} + 3\hat{k}) = -3(p-1) - 6 = -3p + 3 - 6 = -3p - 3$.
Shortest Distance $d = \frac{|(\vec{a_2} - \vec{a_1}) \cdot (\vec{b_1} \times \vec{b_2})|}{|\vec{b_1} \times \vec{b_2}|}$. Given $d = \frac{3}{\sqrt{2}}$, we have: $$\frac{|-3p - 3|}{3\sqrt{2}} = \frac{3}{\sqrt{2}} \implies |-3p - 3| = 9 \implies |p+1| = 3$$ Solving $|p+1| = 3$ gives $p+1 = 3$ or $p+1 = -3$, so $p = 2$ or $p = -4$.
Final Answer: p = 2 or p = -4
AI generated content. Review strictly for academic accuracy.