During the collision between two balls on the pool table there is no external force along the line of collision between them
Since there is no external force on it so here we can say

here we have

so we can say

since there is no external force so we can say during the collision the momentum of two balls will remain conserved