when w = 18 then z =2
take ratio,
k = 18/2
k = 9
when w =45 then z = 5
take ratio
k = 45/5
k = 9
now it is clear that the constant of proportionality is k = 2
so, the relation between w and z is
w = k z
put k = 9
w = 9z
so, the relation between w and z is w = 9z