Algebraic type problem involving 3 sets