Given that the triangles are equal then the ratio of similar sides are equal
(x + 3)/15 = x/(15 - 6)
(x + 3)/15 = x/9
Cross multiply
15x = 9(x + 3)
Expand
15x = 9x + 27
Collect like terms
15x - 9x = 27
6x = 27
Divide both sides by 6
x = 27/6
= 9/2
= 4.5