(working with the assumption that you want to map the graph onto y = 1/(3x), not onto y = (1/3)x)
Not quite, you're right that any change you make inside the bracket will have an 'opposite' effect, but this only really applies visually (so if I transformed f(x) into f(x+2), it would shift two units to the left). However for this question, you aren't asked for what the new graph would look like, so you need to think about it in a different way.
By changing the 'x' inside the bracket into 'x/3', you are changing all the 'x's in your function into 'x/3' (just like if you changed the 'x' inside the bracket to a 9, you would change all the 'x's to 9s). If you substitute that in, you would find y = 1/(x/3), which simplifies to y = 3/x. However, if we were to change the 'x' inside the bracket into '3x', the resulting substitution would yield y = 1/(3x), which is what we want.
Another way you could think about this is by visualising the graphs of y = 1/x and y = 1/(ax). As 'a' increases, the graph 'squishes' more towards the origin. By applying the logic that any change you make inside the bracket will have an 'opposite' effect, we need to multiply whatever is in the bracket by 'a' (remembering that if we transform f(x) into af(x), that would result in a stretch along the y-axis, and the opposite of stretch is squish).
Hope this helps!