
Fahim G. answered 11/04/19
Working engineer with a passion for math, physics, EE, and CS
You know momentum is always conserved, so m1v1i + m2v2i = mvf where i stands for initial and f for final, and mass of bullet is m1 and mass of sponge is m2. Let m = m1 + m2. You should be able to determine the final velocity of the system (the velocity of the mass of bullet embedded in the sponge).
This final velocity is can be used as an initial velocity because you know that the system will travel upwards until its velocity is 0, and then will fall. You also know that the only force it experiences during this upward travel is gravity, so its acceleration is -9.8 m/s2 (negative because its decelerating, meaning force is opposite of motion). Thus think of a kinematics equation which contains final velocity, initial velocity, the distance you are interested in, and acceleration.
You should be able to use vf2 = vi2+2ad to determine the answer.