Let m (kg) = the mass of the body.
The body attains a velocity of 20 m/s in 5 s. Therefore the acceleration is
a = (20 m/s)/(5 s) = 4 m/s².
Note that
F = ma
where
F = applied force,
a = acceleration,
m = mass
The applied force is 40 N, therefore
(m kg)*(4 m/s²) = 40 N
m = 40/4 = 10 kg
Answer: 10 kg