Giiven Z is proportional to x let us suppose Z contain x as Cx where c is some constant 
Z is inversely proportional to y let us suppose Z contain y as k(1/y) where k is also some another constant .
WE can write Z= (c x)/( ky )
Or Z= ( c/k) ( x/y ) where c/k is a constant 
Given at x= 12 y= 4 z= 57 . let us place these values in this equation
 57 = ( c/k)( 12/4) 
 57= ( c/k) (3)
19 = c/k we got the constant value .
we can write Z= 19( x/y) 
Now if x= 18 and y = 10 we need to find Z
 Z= 19( 18/10) 
Z=34.2
Answer : 34.2