You were on the right track, I totally understand why you'd get stuck where you are currently in the process. To start with, you technically found the wrong ratio between the two triangles. Your ratio is just 2x, while it should be 2x/5.
To start, let's find the ratio between triangle FEG and ABC by dividing angle F by and A:

Now, multiply angle B by this ratio:

We can now set this expression equal to angle E, as we have multiplied by the common ratio:

This looks rather daunting, but let's keep calm... you can do this!!
Start by subtracting 18 from both sides:

Now, let's get the whole expression under the denominator 5:

Notice that the denominator can now be removed:

Now, factor the equation (you could also use the quadratic eq if you want)

Notice that we have two potential values for x (5 and -9).
Think about this logically... If we use -9 and plug it in for x, we will end up with values of -5 degrees for an angle, which is impossible! Therefore 5 is the only valid answer!
I encourage you to also approach the problem from a different angle and use the common factor (5/2x) and multiply it by 18 :)