Line joining A (7, p, 2) and B (q, -2, 5) is written as
AB = (q – 7) i + (- 2 – p) j + 3k
Line joining C (2, -3, 5) and D (-6, -15, 11) is written as
CD = -8i – 12j + 6k
Here the angle between line segments is zero so the cross product is zero
AB × CD = 0
Substituting the values
((q – 7) i + (-2 – p) j + 3k) × (- 8i – 12j + 6k) = 0
By solving the above equation we get
p = 4 and q = 3