Why is the second one (cb) and not (bc), since both orderings are in the input string? What permits me to pick one subexpression over the other? You still aren't clear, and the specification is still ambiguous to me.
Let's start over:
The whole expression ((...)(...)) can be simplified
if the two partial expressions (inside the braces) differ
in just one negated variable.
If the whole expression can be simplified, then the result
is the first partial expression without the variable that
differs. (So have to pick first partial expression.)
That's why (in these two examples) one output is (cb)
and the other one is (bc)