Question 11165
Well, first of all, a vertical line has an undefined slope. Remember that slope is defined as "rise over run". A vertical line has "rise" but "zero run", so the slope  becomes rise over zero and, in math, anything over zero is undefined.   As you pointed out though, the line has an x-intercept (x = 5) but no y-intercept.

A horizontal line,on the other hand, has a zero slope.

So you really can't write the equation of a vertical line in the slope-intercept form because a vertical line passes through all values of y, so y is not a component of the equation.

The equation of the vertical line in your problem is just:  x = 5