I don't think it's possible to calculate it with the information given.
The kinetic energy after the collision is
(1/2) (mass) (speed)²
= (1/2) (3kg + 20g) (1.5 m/s)²
= (1.51 kg) (2.25 m²/s²)
= 3.3975 joules .
That's nice to know, but we can't tell how much there was before the
collision, because we don't know what the speed of the bullet was.