Given that the mass of the block is m = 5 kg
The total force is F = 5+12 = 17 N
The displacement of the block is d = 2 m
We have to find the gain in kinetic energy.
The gain in kinetic energy is given by the formula

Substituting the values, the gain in kinetic energy will be

Thus, the gain in kinetic energy is 34 J