An angle bisector AC divides trapezoid ABCD into two similar triangles, ABC and ACD. Find the perimeter of this trapezoid if leg AB = 9.
A) 18
B) 27
C) 36
D) 45