The big square has side length of 5.
The small square has a side length of \(\sqrt {12} = 2\sqrt3\)
The rectangles are congruent, so their width can be expressed as \(2x+2\sqrt3=5\)
Solving for x, we find \(x = {{5 - 2\sqrt3} \over 2}\)
The length can be expressed as \({2\sqrt3}+{5 -2\sqrt3 \over 2} = {5+2\sqrt3 \over2}\)
Using the Pythagorean Theorem, the length of the diagonal is \(\color{brown}\boxed{5\sqrt2 \over2}\)
.