"y varies directly as x" means y = kx
you do not know what k is yet, other than that it is some constant number.
Now plug in the given values, y=12 when x=4, in the equation
12 = 4k
=> k = 3
Now rewrite the equation with the k value you just found
y = 3k
Substitute 18 in place of x
y = 3(18)
y = 54
华人工商课后辅导小组是由一群专精美国小学、初中、高中数学等科目的老师组成。欢迎美国的学生们在每天下午2点至5点之间,线上提问,我们将以最快的速度为大家解答。