(N/A) Mass of the bullet,$m = 0.012\;kg$.
Initial speed of the bullet,$u_b = 70\;m\;s^{-1}$.
Mass of the wooden block,$M = 0.4\;kg$.
Initial speed of the wooden block,$u_B = 0\;m\;s^{-1}$.
Let the final speed of the system (bullet + block) be $v$.
Applying the law of conservation of momentum: $m u_b + M u_B = (m + M) v$.
$0.012 \times 70 + 0.4 \times 0 = (0.012 + 0.4) v$.
$0.84 = 0.412 v \implies v = \frac{0.84}{0.412} \approx 2.039\;m\;s^{-1}$.
For the system of the bullet and the wooden block,applying the law of conservation of energy: $m' g h = \frac{1}{2} m' v^2$,where $m' = m + M = 0.412\;kg$.
$h = \frac{v^2}{2g} = \frac{(2.039)^2}{2 \times 9.8} \approx 0.212\;m$.
The wooden block will rise to a height of $0.212\;m$.
Heat produced = Initial kinetic energy of the bullet - Final kinetic energy of the system.
Heat = $\frac{1}{2} m u_b^2 - \frac{1}{2} (m + M) v^2$.
Heat = $\frac{1}{2} \times 0.012 \times (70)^2 - \frac{1}{2} \times 0.412 \times (2.039)^2$.
Heat = $29.4 - 0.857 = 28.543\;J$.