x = 6 units
Explanations:The triangle shown is a right angled triangle.
To make it obvious, it can be redrawn as shown below
The area of a right-angled triangle is given by the formula:
[tex]\begin{gathered} \text{Area = }\frac{1}{2}\times base\times height \\ \text{Base = 6} \\ \text{Height = x} \\ \text{Area = 18 units}^2 \end{gathered}[/tex]Substituting the necessary parameters into the formula
[tex]\begin{gathered} 18\text{ = }\frac{1}{2}\times6\times x \\ 18\text{ = 3x} \\ x\text{ = }\frac{18}{3} \\ x\text{ = 6 units} \end{gathered}[/tex]