Perl 6, 3838 30 bytes
{+(1...all ~*∉$_,*.comb==x.max.comb...*∉$_).tail}
Anonymous codeblock that takes input as a list of two strings, and returns the first number that is the same length as the stringfrom 1111...
with a non-empty amount of 1s that isn't in the maximum length, and is not equal to either stringinput.
Explanation:
{ } # Anonymous codeblock
code block
1. x.max. comb # StartingString frommultiply 1, increment until
all , by the size of the #non-empty Both:string
~*∉$_ ... # The numberCreate isa notsequence inincreasing theby input1
*.comb *∉$_ # And the length ofUntil the number
==.max.comb # Isis equalnot toin the maximum lengthinput
+( ).tail # Return the# lengthAnd oftake the sequencelast number