MyHeritage interview question

Check if 2 strings are equal by some rules