To solve the problem, we will follow these steps:
### Step 1: Find the coordinates of the midpoint M of AC
The coordinates of points A, B, and C are given as:
- A(3, 0, -1)
- B(2, 10, 6)
- C(1, 2, 1)
The midpoint M of AC can be calculated using the formula:
\[
M = \left( \frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \frac{z_1 + z_2}{2} \right)
\]
Substituting the coordinates of A and C:
\[
M = \left( \frac{3 + 1}{2}, \frac{0 + 2}{2}, \frac{-1 + 1}{2} \right) = \left( \frac{4}{2}, \frac{2}{2}, \frac{0}{2} \right) = (2, 1, 0)
\]
### Step 2: Find the coordinates of point G that divides BM in the ratio 2:1
Using the section formula, the coordinates of point G dividing the line segment BM in the ratio 2:1 can be calculated as:
\[
G = \left( \frac{mx_2 + nx_1}{m+n}, \frac{my_2 + ny_1}{m+n}, \frac{mz_2 + nz_1}{m+n} \right)
\]
where \( B(2, 10, 6) \) is \( (x_1, y_1, z_1) \) and \( M(2, 1, 0) \) is \( (x_2, y_2, z_2) \), and \( m = 2, n = 1 \).
Calculating the coordinates of G:
\[
G = \left( \frac{2 \cdot 2 + 1 \cdot 2}{2 + 1}, \frac{2 \cdot 1 + 1 \cdot 10}{2 + 1}, \frac{2 \cdot 0 + 1 \cdot 6}{2 + 1} \right)
\]
\[
G = \left( \frac{4 + 2}{3}, \frac{2 + 10}{3}, \frac{0 + 6}{3} \right) = \left( \frac{6}{3}, \frac{12}{3}, \frac{6}{3} \right) = (2, 4, 2)
\]
### Step 3: Find vectors OA and OG
The vector \( \vec{OA} \) from the origin O(0, 0, 0) to A(3, 0, -1) is:
\[
\vec{OA} = 3\hat{i} + 0\hat{j} - 1\hat{k}
\]
The vector \( \vec{OG} \) from the origin O(0, 0, 0) to G(2, 4, 2) is:
\[
\vec{OG} = 2\hat{i} + 4\hat{j} + 2\hat{k}
\]
### Step 4: Calculate the dot product \( \vec{OA} \cdot \vec{OG} \)
\[
\vec{OA} \cdot \vec{OG} = (3)(2) + (0)(4) + (-1)(2) = 6 + 0 - 2 = 4
\]
### Step 5: Find the magnitudes of \( \vec{OA} \) and \( \vec{OG} \)
The magnitude of \( \vec{OA} \) is:
\[
|\vec{OA}| = \sqrt{3^2 + 0^2 + (-1)^2} = \sqrt{9 + 0 + 1} = \sqrt{10}
\]
The magnitude of \( \vec{OG} \) is:
\[
|\vec{OG}| = \sqrt{2^2 + 4^2 + 2^2} = \sqrt{4 + 16 + 4} = \sqrt{24} = 2\sqrt{6}
\]
### Step 6: Calculate \( \cos(\angle GOA) \)
Using the formula for the cosine of the angle between two vectors:
\[
\cos(\angle GOA) = \frac{\vec{OA} \cdot \vec{OG}}{|\vec{OA}| |\vec{OG}|}
\]
Substituting the values:
\[
\cos(\angle GOA) = \frac{4}{\sqrt{10} \cdot 2\sqrt{6}} = \frac{4}{2\sqrt{60}} = \frac{2}{\sqrt{60}} = \frac{2}{2\sqrt{15}} = \frac{1}{\sqrt{15}}
\]
### Final Answer
Thus, the value of \( \cos(\angle GOA) \) is:
\[
\boxed{\frac{1}{\sqrt{15}}}
\]