Building blocks

Can you find the length of AB in this diagram?
Exploring and noticing Working systematically Conjecturing and generalising Visualising and representing Reasoning, convincing and proving
Being curious Being resourceful Being resilient Being collaborative

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.