Since $$\vec{d}$$ is coplanar with $$\vec{a}$$ and $$\vec{b}$$, it can be written as a linear combination of them:
$$\vec{d} = \lambda \vec{a} + \mu \vec{b}$$
Substitute the given vectors $$\vec{a}$$ and $$\vec{b}$$:
$$\vec{d} = \lambda(\hat{i} + \hat{j} + \hat{k}) + \mu(\hat{i} - \hat{j} + \hat{k})$$ $$\vec{d} = (\lambda + \mu)\hat{i} + \lambda - \mu)\hat{j} + (\lambda + \mu)\hat{k}$$
We are given that $$\vec{d}$$ is perpendicular to $$\vec{a}$$ ($$\vec{d} \cdot \vec{a} = 0$$):
$$(\lambda \vec{a} + \mu \vec{b}) \cdot \vec{a} = 0$$ $$\lambda |\vec{a}|^2 + \mu (\vec{b} \cdot \vec{a}) = 0$$
Let's calculate the required dot products:
- $$|\vec{a}|^2 = 1^2 + 1^2 + 1^2 = 3$$
- $$\vec{b} \cdot \vec{a} = (1)(1) + (-1)(1) + (1)(1) = 1 - 1 + 1 = 1$$
Substitute these values back into the condition:
$$3\lambda + \mu(1) = 0 \implies \mu = -3\lambda$$
Now, update our expression for $$\vec{d}$$ in terms of $$\lambda$$ only:
$$\vec{d} = \lambda \vec{a} - 3\lambda \vec{b} = \lambda (\vec{a} - 3\vec{b})$$
Let's compute $$\vec{a} - 3\vec{b}$$:
$$\vec{a} - 3\vec{b} = (\hat{i} + \hat{j} + \hat{k}) - 3(\hat{i} - \hat{j} + \hat{k}) = -2\hat{i} + 4\hat{j} - 2\hat{k}$$
So, the vector $$\vec{d}$$ simplifies to:
$$\vec{d} = \lambda(-2\hat{i} + 4\hat{j} - 2\hat{k})$$
We are given $$\vec{d} \cdot \vec{c} = 6$$, where $$\vec{c} = \hat{i} + 2\hat{j} - \hat{k}$$:
$$\lambda(-2\hat{i} + 4\hat{j} - 2\hat{k}) \cdot (\hat{i} + 2\hat{j} - \hat{k}) = 6$$ $$\lambda \left[ (-2)(1) + (4)(2) + (-2)(-1) \right] = 6$$ $$\lambda \left[ -2 + 8 + 2 \right] = 6$$ $$8\lambda = 6 \implies \lambda = \frac{3}{4}$$
Now we can write the exact vector $$\vec{d}$$:
$$\vec{d} = \frac{3}{4}(-2\hat{i} + 4\hat{j} - 2\hat{k}) = -\frac{3}{2}\hat{i} + 3\hat{j} - \frac{3}{2}\hat{k}$$
Finally, compute the square of its magnitude:
$$|\vec{d}|^2 = \left(-\frac{3}{2}\right)^2 + (3)^2 + \left(-\frac{3}{2}\right)^2$$ $$|\vec{d}|^2 = \frac{9}{4} + 9 + \frac{9}{4}$$ $$|\vec{d}|^2 = \frac{18}{4} + 9 = \frac{9}{2} + 9 = \frac{27}{2}$$
Correct Answer: C. $$\frac{27}{2}$$