Let $U$ be the set of all nonempty subsets of $[0,1]$ that are a union of finitely many closed intervals (where an "interval" that is a single point does not count as an interval). Does there exist a function $f:U\times U\rightarrow U$ such that for any $A,B\in U$:
(a) $f(A,B)\neq [0,1]$.
(b) $f(A,B)\cap A\neq\emptyset$ and $f(A,B)\cap B\neq\emptyset$.
(c) The length (i.e. Lebesgue measure) of $f(X,B)\cap A$ is maximized at $X=A$, and the length of $f(A,X)\cap B$ is maximized at $X=B$.
Any two of the three conditions can be satisfied:
$f(A,B)\equiv [0,1]$ satisfy (b) and (c).
$f(A,B)\equiv Y$ for any fixed $Y\neq [0,1]$ satisfy (a) and (c).
$f(A,B)$ being any $Y\neq [0,1]$ that intersects both $A$ and $B$ satisfy (a) and (b).
Satisfying all three seems to be impossible though.