First, you need to establish an equation here.
From the statement "y varies inversely as x", we can write
[tex]y \alpha \frac{1}{x} [/tex]
Note that this is not an equation. To make it an equation, we must put a constant, k here. Therefore, we can say that
[tex]y = k * \frac{1}{x} [/tex] (equation 1)
When y = 8 , x = 7
Substitute it to equation 1 to find the value of k.
8 = k * [tex] \frac{1}{7} [/tex]
k = 42
Find y when x = 2. Substitute the value of x and k in equation 1 to find y.
y = (42) * [tex] \frac{1}{2} [/tex]
y = 21