The most basic nature of friction is that it tries to oppose relative motion or tendency of motion. The external force creates a tendency of motion, which friction tries to oppose. Alright, so this suggests the force of friction on the lower block should be $10N$.
But then, look at the motion of the upper $10Kg$ block. There is a friction force of $10N$ acting on it forward, and no other force in the horizontal direction. This shows that the upper block will accelerate forward by $1m/s^2$. There is relative motion between the two blocks!
This defeats the initial purpose of friction, which was to oppose relative motion. If friction is $10N$, it will create relative motion between the two blocks. This is impossible.
What will happen is that friction will adjust to a value such that there is no relative motion between the two blocks, i.e. their velocity and acceleration are the same at all instants. Thus $a_1=a_2$, then you can proceed as @namehere suggests.
The pulley (and the attachment to the ceiling) are part of the system here. Because of this, you cannot simply use conservation of momentum on the three given masses.
If the final velocity were $v$, then the total energy of the system would have increased since both the pan and counterweight would be moving and the other mass would not have slowed.
You can't use conservation of momentum equations on only a portion of a system. If you imagine a ball bouncing on the floor, you can't say the momentum of the ball is conserved before and after the bounce. You have to consider the change in momentum of the floor as well.
In your problem, the change in momentum of the ceiling will be small, but relevant.
$$\Delta p_{m1} + \Delta p_{m2} + \Delta p_{pan} + \Delta p_{ceiling} = 0$$
As you do not know the change in this final component, you can't use conservation to solve for the remaining momentum of the other three masses.
Let's change the situation to make this more explicit. Instead of a counterweight, consider two pans and two weights.
![enter image description here](https://i.stack.imgur.com/7qboE.png)
Let's imagine the pulley and string to be massless, so the two pans and two weights have a total mass of $4m$. If the balls have a velocity $v$, then the total momentum of the pulley inside the room is $1mv + 1mv = 2mv$.
But by symmetry, we can see that the pulley isn't going to turn. If we imagine the pans at rest after the collision, we find the momentum is now $0mv$.
If the pulley's connection to the ceiling/room/earth is not part of the system, then we say that forces from that connection were external and changed the total momentum. We cannot use conservation of momentum due to external forces.
If the ceiling/room/earth are part of the system, then after the collision, they have gained $2mv$ downward momentum, so the total system does not change. If we picture the box as nearly massless and in a spaceship instead of earth, the entire box would be moving downward at $v/2$ after the balls hit the pans. (assuming completely inelastic collision). The more massive the box, the slower it moves to retain the velocity. Consider it attached to a building/earth, and the momentum still changes, but the velocity change is no longer measurable.
Best Answer
We consider friction to an impulsive force, in cases when normal force is impulsive. Here's how:
We know that $f=\mu N$(only during slipping motion, for no slipping frictional force is equal to applied force RESISTING friction). Since friction is proportional to normal reaction, it will be impulsive only when normal force is impulsive.
Thus, if in a situation there is a sudden change in normal force, friction will be impulsive( part of reason why a water ballon or mud ball burst or distort when thrown to ground, because of impulsive friction due to impulsivee normal force.)
Therefore, in your question, since normal is impulsive in case 1 , momentum cant be conserved, but it can be done in case 2 because no extra force, tending to make normal force impulsive acts on system.