Can you solve the MAGNET RIDDLE? ft YouTube CEO Susan Wojcicki

I haven't tested this but would this work?

Put one bar on the floor and hold the other (in the same alignment) above it.  Start lowering the top one down towards the other until the bottom one nearly lifts up.

As the magnetic force balances out the gravitational force and the rotational friction, the bottom bar (if it is the magnet) would twist slightly to align with the earth's magnetic field.  If the bottom one doesn't do this then repeat the experiment with the bars reversed. If the bottom one still doesn't twist then maybe you are already aligned with the earth's magnetic field in which case turn them 90 degrees and repeat.