Two triangles are similar when their corresponding angles are congruents (have the same measure) and the corresponding sides are in proportion.
Then, you can use the knowing sides to know the value of the x.
The corresponding sides are:
15cm and 6cm
45cm and x
Then, you can use a rule of three, as follow:
Then, x is: 18cm