It stops after ##2.5s## then it gets pulled backwards. That's what the equations are telling you. But, also, that's what you should be able to see from an understanding of the motion.

If you want to be pedantic then you can show that you got the speed by taking the absolute value of the velocity. But, I'd just write down the positive number as the speed. I think that is a simple enough step.

In this diagram, we see that the .5kg cart is being pulled by the .2 kg mass and has an initial velocity of 7m/s.
We know that the net force (ΣF) acting on the system is going to be the .2 mass being pulled down by the force of gravity, as there is no friction between the cart and the surface. We also know that acceleration is conserved within a system, or that the .2kg mass and .5kg cart accelerate at the same rate, despite the initial velocity.
This can be written in formula as:
ΣF = Fg (.2kg mass) = (.5+.2)*a = (.2*9.8)
a = (.2*9.8)/(.2+.5) = 2.8 m/s/s
I replaced the ΣF with ma because F = m*a and I used both masses because acceleration is conserved within the system meaning that in order to calculate the acceleration of the entire system I need to add the masses to count for all masses within the system. In other words, my formula describes all forces acting on every mass within a system, so in order to calculate the acceleration I need to replace the mass in the net force (ΣF) with all masses because I wrote an equation that applies to all masses in the system.

Now that we know the acceleration of both masses, we can use kinematics to solve for the distance traveled. This can be done with the equation:
Δx = (vi*t)+½a(t*t)
Δx = (7*5)+½2.8(5*5) = 70m

Now that we know the distance, we can find the speed using this other equation:
(vf*vf)=(vi*vi)+2aΔx
vf = √(vi*vi)+2aΔx
vf = √(7*7)+2(2.8)(70) = 21 m/s

If you read through the thread you will see that doublev231 came up with that solution earlier, then realised that the initial speed is supposed to be away from the pulley.