Hey! Let me give you a simple example.
When a is proportional to b,
a=kb, where k is a constant(you can put any random letter)
Then plug in the values you have for a and b and find k. Then use that k value for what you need to calculate.
When a is inversely proportional to b,
then a is proportional to 1/b(as you are getting the inverse of b)
which implies that a=k/b, where k is a constant
Then plug in the values of a and b and find k. Then use the k value for further calculations.
Back to your question...if f is inversely proportional to g^2,
then f is proportional to the inverse of g^2 (i.e. 1/g^2)
which implies f=k/g^2
since f=8 and g=-2,
f=k/g^2
8=k/(-2)^2
8=k/4
k=32
Now you have k. Thus, f=k/g^2
f=32/4^2 (since g=4)
=32/16
=2
I hope that helps! Good luck!