if we draw the diagonal we get a right triangle
the legs are 5 and 5 and hyptonuse is the diagonal
remmeber
for a right triangle with legs a and b and hyptonuse c
a²+b²=c²
so
a=b=5
5²+5²=c²
25+25=c²
50=c²
sqrt both sides
5√2=c
the diagonal is 5√2 cm or about 7.0710678118654752440084436210485cm