It depends on your possition,initiaton and if your mystery is prompt.
So for example, if you are both having your ninja in 1st possition and one of you have propmt mystery it will be casted first...If you both have propmt mystery, the one with higher initiaton will cast it first.