The vertical axis is the y-axis. To find the distance from a point to y-axis (coordinate x=0) you use the coordinate x in the point (x,y) in the next formula:
As the diatance is a positive quantity you get the distance from a absolute value.
For the given point:
Coordinate x = -2
Then, the distance from (-2, -6) to the vertical axis is 2 units