Step 1: Equation of the line.
The equation of a line passing through two points \( (x_1, y_1, z_1) \) and \( (x_2, y_2, z_2) \) is given by the parametric form:
\[
\frac{x - x_1}{x_2 - x_1} = \frac{y - y_1}{y_2 - y_1} = \frac{z - z_1}{z_2 - z_1}
\]
Step 2: Substitute the values.
Substituting the points \( (3, 4, -7) \) and \( (6, -1, 1) \), we get:
\[
\frac{x - 3}{6 - 3} = \frac{y - 4}{-1 - 4} = \frac{z + 7}{1 + 7}
\]
Simplifying:
\[
\frac{x - 3}{3} = \frac{y - 4}{-5} = \frac{z + 7}{8}
\]
Step 3: Conclusion.
Thus, the equation of the line is \( \boxed{\frac{x-3}{3} = \frac{y-4}{-5} = \frac{z+7}{8}} \).