It is given that the line passes through points (x1, y1)=(4, 2) and (x2, y2)= (4, 9).
The slope of the line can be written as,
[tex]\begin{gathered} m=\frac{y2-y1}{x2-x1} \\ m=\frac{9-2}{4-4} \\ m=\frac{7}{0} \end{gathered}[/tex]So, the slope of the line is undefined. When the slope is undefined, the line passes parallel to the y axis and the equation of the line has the form x=b, where b is a constant.
Since the constant x coordinate of the given points is 4, b=4.
So, the equation of the line is x=4.