Given that the points A(2,0,0),B(4,p,q) and C(1,5,2) are collinear.Let the point B divide the line segment AC in the ratio k:1, then by section formula the coordinates of the point B are
(k+2k+1,5k+0k+1,2k+0k+1)
But the coordinates of the point B are (4,p,q), so we have,
k+2k+1=4,5kk+1=p,2kk+1=q
⇒k+2=4k+4,5kk+1=p,2kk+1=q
⇒k−4k=4−2,5kk+1=p,2kk+1=q
⇒−3k=2,5kk+1=p,2kk+1=q
⇒k=−23,5kk+1=p,2kk+1=q
⇒k=−23,5×−23−23+1=p,2×−23−23+1=q
⇒k=−23,p=−103−2+33,q=−43−2+33
⇒k=−23,p=−10313,q=−43−13
∴k=−23,p=−10,q=4