Since each triangle is a right triangle we can apply trigonometric functions:
Sin a = opposite side / hypotenuse
Where;
a = angle = 60° ( we are looking at the bottom left one)
Opposite side = 30 cm
Hypotenuse = AB
Replace:
Sin60 = 30 / AB
Solve for AB
AB = 30 / sin 60
AB = 34.64 cm