If Z varies directly as y and inversely as square root of x and z = 5, when y =3,x=9. Find the value of z when y=18 and x = 25.