What is the value of x?

The top smaller sub-triangle and the whole big triangle are similar. This means that the correspondant sides are in proportion. So, we have
[tex]6\div 5 = 54\div 3x+12[/tex]
Which implies
[tex]6(3x+12)=5\cdot 54 \iff 3x+12=\dfrac{5\cdot 54}{6}=45[/tex]
So, we have
[tex]3x+12 = 45 \iff 3x = 33 \iff x=11[/tex]