Answer:
Step-by-step explanation:
The tension of the cord is not important, what matters is the height the block has risen.
When it has risen to its maximum it will have a speed of 0, and because of that it will have a kinetic energy of 0. However it will have a higher potential energy than it had at the beginning. The difference in potential energy will be:

The energy to rise the block with the bullet embedded into it came from the kinetic energy of the bullet.

These two energies are equal because all the kinetic energy the bullet had was transformed into potential energy. Therefore:

Rearranging:
