Hello Taylor,
The y-axis is a vertical line going through the origin (0,0). Because it's a vertical line, the slope is undefined.
The equation of the y-axis is x = 0 because every point on the y-axis has the same x-coordinate (zero, in this case).
The line parallel to the y-axis and passing through (-2,5) will also have un undefined slope, and every point on that line will have the same x-coordinate of -2. Therefore, the equation will be x= -2
Recap: undefined slope, equation x = -2.