The equation x = 4 has a gradient that is undefined.
The perpendicular to this line would be 0, so
using the point slope form of an equation at the point (4,2)
y - y1 = m (x- x1)
y - 2 = 0 (x - 4)
y - 2 = 0
y = 2 is the equation of the line perpendicular to x = 4 at the point (4, 2)