Since both triangles are similar, the ratio between their sides remains constant. Therefore,
[tex]\frac{6}{12}=\frac{x+6}{12+27}[/tex]Solving for x,
[tex]\begin{gathered} \frac{6}{12}=\frac{x+6}{12+27}\rightarrow\frac{1}{2}=\frac{x+6}{39}\rightarrow\frac{39}{2}=x+6 \\ \rightarrow x=\frac{39}{2}-6 \\ \Rightarrow x=13.5 \end{gathered}[/tex]Therefore, x = 13.5