When a variable y inversely varies with another x, it means that when y is doubled x is halved, when y is tripled x reduces to a third of original value. This is shown below:

Suppose x is 4 when y is 2, then x is halved 2 when y doubled to 4. When x is reduced to 1 (1/4th of the original value) then y is multiplied 4 times the original value to 2*4 = 8

In other words, x*y remains constant, which in the above example is 4*2.

With the background above, we can answer the question

It is given in the question that y is 6 when x is 3.

Since y varies inversely with x, we know that x*y is constant which in this case is 6*3 = 18

When x changes to 2 y = 18/x =9 (since we know x*y = 18)