We must determine the relative number of moles of each element.
"Moles of x" = "0.025 mol"Moles of x=0.025 mol
"Moles of Y" = 3.0 × 10^22 color(red)(cancel(color(black)("atoms"))) × "1 mol"/(6.022 × 10^23 color(red)(cancel(color(black)("atoms")))) = "0.050 mol"
"Moles of Z" = 3.2 color(red)(cancel(color(black)("g"))) × "1 mol"/(32 color(red)(cancel(color(black)("g")))) = "0.10 mol"
Now, we find the molar ratio of "X:Y:Z".
We divide each number of moles by the smallest number ("0.025 mol") and convert them to integers.
"X:Y:Z" = 0.025/0.025:0.050/0.025:0.10/0.025 = 1:2.0:4.0 ≈ 1:2:4
The molecular formula is "XY"_2"Z"_4.