the y axis is a vertical line. A vertical line has a slope that is undefined. A vertical line is also represented by x = a number...with that number being the x coordinate of ur point (2,7).
therefore, ur equation is : x = 2.....and this cannot be written in y = mx + b form because it has an undefined slope.