The formula for the diagonal is :
D= (length^2+width^+height^2)^1/2
D= (12^2*4^2*3^2)^1/2
= (144+16+9)^1/2= (169)^1/2= 13
The length of the diagonal is 13 cm
from https://www.enotes.com/homework-help/find-lenght-diagonal-rectangular-shaped-box-whose-175641
First triangle is 3 by 4, that makes a base of 5.
Than you have right triangle with legs of 5 and 12, so diagonal is 13.