it would be 4 so x=4 because 18 and 6 are the bases and 6 goes into 18 3 times. so what goes into 12 3 times, 4.

Hope this helps you!