Since (2)(1)+(−4)(1)+(1)(2)=0 the line is parallel to the plane. It will lie in the plane if the point (4,2,k) lies on the plane.
The given line passes through the point P(4,2,k) & lies in plane 2x - 4y + z = 7 . So, P must lie on the plane.
∴ 8 – 8 + k = 7 ⇒ k=7.