Given that x varies directly as the square of y and x=2 when y=1, Find x when y=4

x = ky^2, so x/y^2 is constant.

You want x such that
x/4^2 = 2/1^2