For the first part of the motion of the bullet into the block, it can be written that
(3u)2=⇒u2−2a×2448a=98u2...(1)
For the second part of the motion of the bullet through the block, it can be written that
0=⇒(3u)2−2aS2aS=9u2...(2)
Divide equation (2) by equation (1) to obtain the distance travelled by the bullet during the second part of its motion.
48a2aS=⇒98u29u2S=3
Hence, the total length of the block is given by
L==(3+24)cm27cm