Suppose the cellular pool has $x$ATP before starting glycolysis. In the initial phosphorylation steps, we use up two ATP to get the total tally at $(x-2)$ATP. The following steps yields $4$ ATP which brings the final total to $(x+2)$ATP.
Assuming the cell is performing fermentation, the two additional $NADH$ formed will not be contributing to any ATP gain. And hence we _earn a total of $2$ ATP in excess of the already existing amount_.