According to Newton's third law of motion, for every action, there is an equal and opposite reaction. In this case, when one boy pulls the rope, he exerts a force on the rope in one direction. The rope, in turn exerts an equal but opposite force back on the boy. Similarly, when the other boy pulls the rope in the opposite direction, he also exerts a force on the rope. The rope, in response, exerts an equal but opposite force back on him.
Therefore, as both boys applied equal and opposing forces on the rope, the net force acting on the rope was zero. As a result, the rope remained stationary and neither boy moved from their positions.