The pentagons are similar. This means we can enlarge the sides of the smaller figure, by the same factor, and get the larger figure.
This factor is called the scale factor, generally denoted by k.
from the figure we see that 6*k=18, so k=3
similarly, x has been multiplied by k to get 27, so
x*3=27
x=9
Answer: scale factor 3, x=9