If y varies inversely with x, that means that y follows the form: y = a/x. Now, given that y = 12 when x = 7 we just need to plug 12 in for y and 7 in for x into the equation y = a/x and solve for a. Therefore,
y = a/x
12 = a/7; when y = 12 and x = 7
a = 84 (just multiply both sides by 7 to get a alone on one side of the equation).
Now, we have the equation y = 84/x because we just found that a = 84. So, to find y when x = 4, we just need to plug x = 4 into the equation y = 84/x. Therefore,
y = 84/x
y = 84/4; when x = 4
y = 21.