In any tug-o-war that I have participated in, the losing team has to be pulled a certain distance forward FROM THE STARTING POINT.
If that is the case in this instance, then
a) team X pulls Y forward 3m, therefore X's position is X - 3.
b) team Y pulls X forward 5m, therefore X's position is now X - 3 + 5
c) team Y pulls X forward another 2m, therefor X's position is X - 3 + 5 + 2 = X + 4.
That means that X is 4m in front of the starting position. So they must be pulled another 6m if Y is to win.