Building blocks

Can you find the length of AB in this diagram?

Problem



Each of the cubes in the diagram have sides of length 3 cm.

 

Image
Building Blocks



The length of AB is $\sqrt{k}$ cm.

What is the value of $k$?



 

 


This problem is taken from the UKMT Mathematical Challenges.