The interior angles of a triangle will always add to equal 180. Knowing that, we can set up an equation to find x:
6x + 12 + 4x + 4x = 180
14x + 12 = 180
4x = 168
x = 12
If you need to, you can plug 12 into 2x + 18 for x to find the side length.
Hope this helps.