(a) To find \(\overrightarrow{MD}\), we first find \(\overrightarrow{OM}\) which is the midpoint of \(AB\). Since \(OA = 4\mathbf{i}\) and \(OB = 4\mathbf{j}\), \(OM = 2\mathbf{i} + 2\mathbf{j}\). Thus, \(\overrightarrow{MD} = \overrightarrow{OD} - \overrightarrow{OM} = 3\mathbf{k} - (2\mathbf{i} + 2\mathbf{j}) = -2\mathbf{i} - 2\mathbf{j} + 3\mathbf{k}\).
For \(\overrightarrow{ON}\), since \(N\) divides \(BC\) in the ratio 2:1, \(\overrightarrow{ON} = \overrightarrow{OB} + \frac{2}{3}(\overrightarrow{OC} - \overrightarrow{OB}) = 4\mathbf{j} + \frac{2}{3}(\mathbf{i} + \mathbf{k} - 4\mathbf{j}) = 3\mathbf{j} + \mathbf{k}\).
(b) The angle \(\theta\) between \(\overrightarrow{MD}\) and \(\overrightarrow{ON}\) is given by \(\cos \theta = \frac{\overrightarrow{MD} \cdot \overrightarrow{ON}}{|\overrightarrow{MD}| |\overrightarrow{ON}|}\).
\(\overrightarrow{MD} \cdot \overrightarrow{ON} = (-2)(0) + (-2)(3) + (3)(1) = -6 + 3 = -3\).
\(|\overrightarrow{MD}| = \sqrt{(-2)^2 + (-2)^2 + 3^2} = \sqrt{17}\), \(|\overrightarrow{ON}| = \sqrt{3^2 + 1^2} = \sqrt{10}\).
\(\cos \theta = \frac{-3}{\sqrt{17} \cdot \sqrt{10}}\).
\(\theta = \cos^{-1}\left(\frac{-3}{\sqrt{170}}\right) \approx 103.3^\circ\).
(c) To find the perpendicular distance from \(M\) to \(ON\), consider the projection of \(\overrightarrow{OM}\) on \(\overrightarrow{ON}\).
\(\text{Projection of } \overrightarrow{OM} \text{ on } \overrightarrow{ON} = \frac{\overrightarrow{OM} \cdot \overrightarrow{ON}}{|\overrightarrow{ON}|^2} \overrightarrow{ON}\).
\(\overrightarrow{OM} \cdot \overrightarrow{ON} = (2\mathbf{i} + 2\mathbf{j}) \cdot (3\mathbf{j} + \mathbf{k}) = 6\).
\(\text{Projection length} = \frac{6}{10} = \frac{3}{5}\).
\(\text{Perpendicular distance} = \sqrt{|\overrightarrow{OM}|^2 - \left(\frac{3}{5}\right)^2 |\overrightarrow{ON}|^2} = \sqrt{8 - \frac{9}{5}} = \sqrt{\frac{22}{5}}\).