We need to write down momentum and energy conservation laws, this will give us a system of equation that we can solve to get our final answer. On the right-hand side, I will write term after the collision and on the left-hand side, I will write terms before the collision.
Let's start with energy conservation law:


This equation tells us that kinetic energy of two carts before the collision and 3 quarters of explosion energy is beign transfered to kinetic energy of the cart after the collision.
Let's write down momentum conservation law:

Because both carts have the same mass we can cancel those out:

Now we have our system of equation that we have to solve:
Part A
We need to solve our system for

. We will solve second equation for

and then plug that in the first equation.

Now we have to plug this in the first equation:

We will multiply the first equation with 2 and divide by m:

Now we plug in the second equation into first one:

We end up with quadratic equation that we have to solve, I won't solve it by hand.
Coefficients are:

Solutions are:
Part B
We do the same thing here, but we must express

from momentum equation:

Now we plug this into our energy conservation equation:

Again we end up with quadratic equation. Coefficients are:

Solutions are: