Tutor @ikleyn has provided a response showing one way (of many!) to approach a problem like this.
Another common method is to determine the constant of variation from the given data...
... and then evaluate the formula with that constant and the new data.
And here is the way I myself find easiest to use....
z is 96 when x is 2 and y is 2.
When x changes from 2 to 3, the value of z changes by a factor of 3/2.
When y changes from 2 to 3, the value of z changes by a factor of (3/2)^3.
The "new" value of z is
Different students will find different methods more to their liking; try these different methods and find what "works" for you.