Vary Directly: x = k*y
Vary Inversely: x = k/y
Because x and y vary directly, our equation will look like the first one.
x = k*y
With the inputted values:
12 = k * 20
Now, to find k, isolate the variable

Therefore,
k = 12/20 = 3/5 = 0.6
Your final equation will then look like this:
x = 3/5 * y or x = 0.6 * y