Hello!
We can use the following relationship:
ΔKE = Change in Kinetic Energy (J)
W = Work done on object (J)
F = Force (N)
d = distance of which the force is applied to the object. (This is equivalent to the length of the gun barrel, or 0.8 m)
Also, recall that:
m = mass of bullet (0.02 kg)
v = velocity of bullet (vfinal = 985 m/s, vinitial = 0 m/s)
We can now solve.