The equation of the line perpendicular to the x-axis is x = k.
It is given that x = k has intercept −2 on the x-axis. This means that the line x = k passes through (−2, 0).
∴ −2 = k
k = −2
Hence, the equation of the line that is perpendicular to the x-axis and has intercept − 2 on the x-axis is x = −2.