For three points to be collinear in 3D space, the vectors formed by the points must be scalar multiples of each other. We calculate the vectors \( \overrightarrow{AB} \) and \( \overrightarrow{AC} \) and solve for \( k \) and \( m \).
Step 1: Calculate the vectors.
\[
\overrightarrow{AB} = (1 - k, -1, -2), \quad \overrightarrow{AC} = (7 - k, -3, m - 5)
\]
Step 2: Set up the scalar multiple condition.
\[
\overrightarrow{AC} = \lambda \overrightarrow{AB}
\]
Solving the system, we get \( k = -2 \) and \( m = -1 \).
Final Answer:
\[
\boxed{(-2, -1)}
\]