Pythagoras theorem states that in a right angled triangle, the square on
the hypotenuse is equal to the sum of of the squares on the remaining
two sides.
First, we consider the △ADC and applying Pathagoras theorem we get,
DB2=DC2+BC2
DB2=122+32
DB2=144+9
DB2=153
Now, we consider the △ABD and applying Pathagoras theorem we get,
DA2=DB2+BA2
132=153+BA2
BA2=169−153=16
BA=4
The length of AB is 4 cm