Solomon's trick was successful because the true mother would rather have given the baby up than see it killed. It would have worked even if the false mother had also cried out, because the false mother wouldn't have offered to give the baby up.
To put it another way, a person falsely claiming to be the baby's mother, faced with that sort of situation, could only do one of three things: 1) agree to have the baby divided, 2) say that it shouldn't be killed (and say nothing else), or 3) admit that she was lying. Only the true mother would offer to give the baby up.