Could someone just show me how to solve this? I don't want an answer, I would like to solve it on my own, I just don't know how to write an equation for this. Please help!

You would set up a ratio for the two known sides to equal the known side and x:
8/2 = 18/x
Cross multiply:
(2 * 18) = (8 * x)
Simplify:
36 = 8x
Solve for x by dividing both sides by 8:
x = 36/8
x = 4.5