To make it simpler to write (since i can’t cross things out here), combine them first.
numerator : 24(15).x^5.y^8.z^7
denominator: 40(6).x^3.y^6.z^9
First, the numbers.
24(15)/[40(6)] = 3/2
Then x: x^5/x^3 = x^(5-3) = x^2
Then y: y^8/y^6 = y^2
Then z: z^7/z^9 = z^(-2) = 1/z^2
Result: [3.x^2.y^2]/(z^2)