ZBUFFER question 2
After the projection matrix is applied, the coordinates are converted into normalized device coordinates by dividing by the w component. This puts the x,y coordinates into the range [-1, 1] and the z coordinate into the range [0, 1] (for DirectX). For z, 0 is closest and 1 is farthest.
When each pixel is rendered, it's z value is compared to the same location in the zbuffer using a configurable comparison function. By default, the comparison function is less than. This means that if the z value of the new pixel being rendered is less than the z value already in that location of the zbuffer, the new pixel is rendered and the zbuffer is updated with the new value. If the z value greater than or equal to the existing value, the new pixel is skipped and not rendered because it is farther away than the pixel already there. Clearing the zbuffer typically resets everything to 1 since that is the farthest value, and you usually want the closest objects to be visible.
If you are using a left handed coordinate system where +z goes into the screen, and you are using the default < compare, then in your example the zbuffer will contain the lower z value since it is closer (providing it isn't behind the camera). However, that value will have been normalized to the range [0, 1], so it won't actually be -2.
Edit: I only mentioned DirectX because your other post referred to DirectX, but for completeness OpenGL normalizes z values to [-1, 1].