As we know from work energy theorem
Work done by all the forces is change in kinetic energy of the system
here we know that finally it stops so final kinetic energy of the cart here is ZERO
while we need to find the initial kinetic energy of the cart which is equal to the work done
so here we can say
[tex]W = KE[/tex]
also we know that work done by the force is given by
[tex]W = F.d[/tex]
here we have
F = 300 N
d = 20 m
[tex]W = 300 \times 20[/tex]
[tex]W = 6000 J[/tex]
so kinetic energy of the cart will be 6000 J