Not quite. The answer is C.
How to solve it
Both carts start with the same momentum and end at rest, so they need the same impulse to stop. The foam compresses, giving its cart more time to stop. The same impulse delivered over more time requires a smaller average force.