... how exactly do the ranging circles for the main gun on the right tell how far the target the gun's gonna hit?
The gunner adjusts the range setting of the sight, which moves the central crosshairs up and down; the top point of the triangle is the point of impact at the set range if zeroed and ideal. The outer ring of ranges rotates at the same time, with the one at the top (being pointed at by the pipper) denoting the currently selected range.