Mensa's "solution"

1/2x241/3x18

=
8z
so

126

=
8z
so

z=4