solution::
In 2D(or in plane of paper), imagine the train moving in horizontal direction & the pacekts are thrown in vertical direction.
now, since the packets are thrown perpendicular to the train so, they will have no relative velocity with respect to the train when they are thrown.
let mass of each train be M & each packet be m
using conservation of momentum on each train when the packets are in air, to the situation when the packets are exchaged.
for train with velocity 'a'
Ma +mb = (M+m) V where V is final velocity of train 'a'
V = (Ma + mb)/(M+m) ----(1)
for train with velocity 'b'
(Mb + ma) = (M+m) v where v is final velocity of train 'b'
v = (Mb + ma)/(M+m) ------(2)
now, M>>m & a>b
so, observing & comparing v & V from (1) & (2) shows us that train 'a' should accelerate.
i hope this is a convincing answer.