The motion of electrons can be calculated by using the equations of projectile motion.
The electrons reach the maximum height at
H= v2*(sin(θ))2/2*g
and leave the plate at the range of
R=v2sin(2θ)/g
(Note: H is the distance between two plates, R is the length of plate, v is the initial velocity...
So, what you need to do is to resolve the m1 and m2 into both x & y component. After that, solve the system by applying the momentum conservation principle at both X and Y component.