This problem is all about translating English in to Math. saying "x varies directly as y" means as y increases, x will increase and as y decreases, x will decrease too. So we know that as y goes up, so does x, but we don't know how much x will increase (same thing if y goes down).
So we use to formula y=kx when we talk about "x varies directly as y"
We were given a pair of x and y, x=28 when y=4, so, 4=k(28), solve for k. 4/28=k so 1/7=k
Now we are ready to answer the final part of the question, find x when y=9
We use the same formula as before y=kx y=9 and k=1/7 so 9=(1/7)x 9/(1/7)=x 9(7/1)=x
with these kind of problems it is helpful to know that "directly" means multiplication y=kx
"inversely" means division y=k/x
If you need any clarification, comment on this post.